# Instantiate a modelbuilder for a model and a toolcontext
# Important, the options of the toolcontext must be correctly set (parse_option already called)
- init(model: Model, toolcontext: ToolContext)
+ init
do
- self.model = model
- self.toolcontext = toolcontext
assert toolcontext.modelbuilder_real == null
toolcontext.modelbuilder_real = self
end
var nit_dir = toolcontext.nit_dir
- if nit_dir != null then
- var libname = "{nit_dir}/lib"
- if libname.file_exists then paths.add(libname)
- end
+ var libname = "{nit_dir}/lib"
+ if libname.file_exists then paths.add(libname)
end
# Load a bunch of modules.
self.toolcontext.info("{mmodule} imports {imported_modules.join(", ")}", 3)
mmodule.set_imported_mmodules(imported_modules)
+ # Force standard to be public if imported
+ for sup in mmodule.in_importation.greaters do
+ if sup.name == "standard" then
+ mmodule.set_visibility_for(sup, public_visibility)
+ end
+ end
+
# TODO: Correctly check for useless importation
# It is even doable?
var directs = mmodule.in_importation.direct_greaters