Package jetbrains.mps.project.structure
Class ProjectStructureModule
- java.lang.Object
-
- jetbrains.mps.extapi.module.SModuleBase
-
- jetbrains.mps.project.AbstractModule
-
- jetbrains.mps.project.structure.ProjectStructureModule
-
- All Implemented Interfaces:
CoreComponent,EditableSModule,SModule
@Deprecated public class ProjectStructureModule extends AbstractModule implements CoreComponent
Deprecated.there seems to be no justification for stateless PSM. Tell MPS team (Artem) if you got any. Otherwise, the code will cease to exist soon.There seems to be little value in stateful collection of nodes that describe repository modules - we have to keep them up to date on almost any model change even if there's no uses (it's mostly lang/generator @descriptor models that utilize these nodes, the rest of the code just doesnode.isInstanceOf(Generator)). Besides, this change listener implicitly assumes what kind of repository change is worth to be reflected in a Module node, and which is not (i.e. adding a new model triggers a refresh, while adding a root does not). Nevertheless, the code to provide 'virtual' module into a repository might be worth to keep as it's kind of task that comes up from time to time (see MPSSPRT-133) Indeed, in that case it has not be CoreComponent and global singleton, rather per-SRepository instance. Yet in this case it's not clear to how to do module registration lazily (i.e. getModelByModule() may come when there's no write lock for a repository, can't add respective node on demand). Alternative is to keep SModule non registered, though associated with a repo, so that we can change it at will. FIXME Before removing, have to fix FindInPriorityRules finder in lang.generator!
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classProjectStructureModule.ProjectStructureSModelDescriptorDeprecated.-
Nested classes/interfaces inherited from class jetbrains.mps.project.AbstractModule
AbstractModule.LangAndDevkits
-
-
Field Summary
-
Fields inherited from class jetbrains.mps.project.AbstractModule
CLASSES, CLASSES_GEN, MODULE_DIR
-
Fields inherited from class jetbrains.mps.extapi.module.SModuleBase
MODEL_BY_NAME_COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description ProjectStructureModule(SRepositoryExt repository, PersistenceFacade persistenceFacade)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclearAll()Deprecated.protected voidcollectMandatoryFacetTypes(Set<String> set)Deprecated.For the time being, MPS enforces certain facets for modules (e.g.ProjectStructureModule.ProjectStructureSModelDescriptorcreateModel(SModule module)Deprecated.voiddispose()Deprecated.static ProjectStructureModulegetInstance()Deprecated.usegetInstance(SRepository)insteadstatic ProjectStructureModulegetInstance(SRepository repo)Deprecated.There's single ProjectStructureModule per project, thus if you use Project.getRepository(), you are guaranteed to get an instance.SModelgetModelByModule(SModule module)Deprecated.Set<SLanguage>getUsedLanguages()Deprecated.Returns all used languages by this modulevoidinit()Deprecated.StringtoString()Deprecated.-
Methods inherited from class jetbrains.mps.project.AbstractModule
addDependency, attach, collectLanguagesAndDevkits, dependenciesChanged, doSetModuleDescriptor, getDeclaredDependencies, getDependencyVersion, getDependencyVersion, getDescriptorFile, getFacet, getFacets, getFileSystem, getModelRoots, getModuleDescriptor, getModuleId, getModuleName, getModuleReference, getModuleSourceDir, getModuleVersion, getOutputPath, getScope, getSourcePaths, getUsedLanguageVersion, getUsedLanguageVersion, handleReadProblem, isChanged, isPackaged, isReadOnly, loadRoots, onModuleLoad, reloadAfterDescriptorChange, removeDependency, rename, renameModels, save, setChanged, setModuleDescriptor, setModuleDescriptor, setModuleReference, setModuleVersion, setupFacet, updateExternalReferences, updateFacets, updateModelsSet, updatePackagedDescriptor
-
Methods inherited from class jetbrains.mps.extapi.module.SModuleBase
addModuleListener, assertCanChange, assertCanRead, fireBeforeModelRenamed, fireChanged, fireModelRenamed, fireModuleRenamed, getModel, getModels, getRepository, registerModel, removeModuleListener, unregisterModel
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jetbrains.mps.openapi.module.SModule
addModuleListener, getModel, getModels, getModels, getRepository, removeModuleListener
-
-
-
-
Constructor Detail
-
ProjectStructureModule
@Deprecated public ProjectStructureModule(@NotNull SRepositoryExt repository, @NotNull PersistenceFacade persistenceFacade)
Deprecated.
-
-
Method Detail
-
getInstance
@Deprecated public static ProjectStructureModule getInstance()
Deprecated.usegetInstance(SRepository)instead
-
getInstance
@Nullable public static ProjectStructureModule getInstance(@NotNull SRepository repo)
Deprecated.There's single ProjectStructureModule per project, thus if you use Project.getRepository(), you are guaranteed to get an instance.
-
init
public void init()
Deprecated.- Specified by:
initin interfaceCoreComponent
-
dispose
public void dispose()
Deprecated.- Specified by:
disposein interfaceCoreComponent- Overrides:
disposein classAbstractModule
-
clearAll
public void clearAll()
Deprecated.
-
getUsedLanguages
public Set<SLanguage> getUsedLanguages()
Deprecated.Description copied from interface:SModuleReturns all used languages by this module- Specified by:
getUsedLanguagesin interfaceSModule- Overrides:
getUsedLanguagesin classAbstractModule
-
createModel
public ProjectStructureModule.ProjectStructureSModelDescriptor createModel(SModule module)
Deprecated.
-
toString
public String toString()
Deprecated.- Overrides:
toStringin classAbstractModule
-
collectMandatoryFacetTypes
protected void collectMandatoryFacetTypes(Set<String> set)
Deprecated.Description copied from class:AbstractModuleFor the time being, MPS enforces certain facets for modules (e.g. Java facet is essential for classloading mechanism). As we move forward with facets story, we likely respect actual facets for the module (e.g. would force Java facet on module creation only) Need to ensure classloading could deal with modules without Java facet, then can drop these mandatory facets altogether- Overrides:
collectMandatoryFacetTypesin classAbstractModule
-
-