Class 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 does node.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!