Package jetbrains.mps.smodel
Class ModelDependencyUpdate
- java.lang.Object
 - 
- jetbrains.mps.smodel.ModelDependencyUpdate
 
 
- 
public final class ModelDependencyUpdate extends Object
Facility to update dependencies of a model based on its actual content. Doesn't address model access here. Generally, clients shallupdateUsedLanguages()first (as it might affect implicit model imports, like language's accessory models), thenupdateImportedModels(SRepository). Then, if desired and model belongs to a proper module,updateModuleDependencies(SRepository)could bring module's dependencies in the matching state. Nevertheless, methods could be invoked individually according to a task at hand. XXX Likely, shall reside to [smodel], but now depends from [project] (AbstractModule) and [kernel] (ModelImports).- Since:
 - 2017.2
 
 
- 
- 
Constructor Summary
Constructors Constructor Description ModelDependencyUpdate(SModel model) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelDependencyUpdateupdateImportedModels(SRepository languageModuleRepo)Updates list of imported models, with respect to models visible through actual list of used languages.ModelDependencyUpdateupdateModuleDependencies(SRepository importsRepo)Takes actual list of model imports and propagates these dependencies into model's module dependencies.ModelDependencyUpdateupdateUsedLanguages() 
 - 
 
- 
- 
Method Detail
- 
updateUsedLanguages
public ModelDependencyUpdate updateUsedLanguages()
 
- 
updateImportedModels
public ModelDependencyUpdate updateImportedModels(@Nullable SRepository languageModuleRepo)
Updates list of imported models, with respect to models visible through actual list of used languages. It's recommended toupdateUsedLanguages()first so that accessory models of used languages are not imported explicitly. ResemblesModelImporterand might be part ofModelImportsdirectly- Parameters:
 languageModuleRepo- optional repository to resolve accessory models of used languages so that they get imported implicitly. Implementation expects source modules of deployed languages to be resolved in the supplied repository. If no repository supplied, all model imports will be explicit.
 
- 
updateModuleDependencies
public ModelDependencyUpdate updateModuleDependencies(@NotNull SRepository importsRepo)
Takes actual list of model imports and propagates these dependencies into model's module dependencies. Works withAbstractModuleinstances only, and relies on module's scope to decide whether an import is needed. XXX Does pretty much the same whatMissingDependenciesFixerdoes.- Parameters:
 importsRepo- repository where imported models could get resolved
 
 - 
 
 -