Package jetbrains.mps.project
Class Project
- java.lang.Object
 - 
- jetbrains.mps.project.Project
 
 
- 
- All Implemented Interfaces:
 IProject,MPSModuleOwner,Project
- Direct Known Subclasses:
 ProjectBase
public abstract class Project extends Object implements MPSModuleOwner, IProject
MPS Project abstraction. Project may rely on the idea Project or it may not. It has a scope and a corresponding project repository to store modules in it. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description classProject.ProjectScope 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddispose()closes and disposes the projectabstract <T> TgetComponent(Class<T> t)Generic extension mechanismModelAccessgetModelAccess()Shorthand forgetRepository().getModelAccess()Iterable<? extends SModule>getModules()Deprecated.use {@link #getProjectModules)} instead AP fixme : why to return Iterable extends>? isn't it easier to give out a collection, e.g.Iterable<? extends SModule>getModulesWithGenerators()Deprecated.usegetProjectModulesWithGenerators()insteadabstract StringgetName()FilegetProjectFile()Deprecated.the project is not necessarily backed up by file.Iterable<SModel>getProjectModels()<T extends SModule>
List<T>getProjectModules(Class<T> moduleClass)Note, call#getProjectModules(SModule.class)is ambiguous, as it doesn't return generators that live under a project's language despite the fact Generator is instaoce of SModule, indeed.List<SModule>getProjectModulesWithGenerators()SRepositorygetRepository()Project.ProjectScopegetScope()protected voidinitRepository(ProjectRepository repository)booleanisDisposed()booleanisHidden()booleanisProjectModule(SModule module)StringtoString()- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface jetbrains.mps.project.IProject
addModule, getProjectModules, removeModule 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
Project
protected Project(String name)
 
- 
Project
@Deprecated protected Project(String name, @NotNull Function<Project,ProjectRepository> repoFactory)
Deprecated.this is an ugly way to pass Project instance into ProjectRepository cons 
 - 
 
- 
Method Detail
- 
initRepository
protected final void initRepository(@NotNull ProjectRepository repository)
 
- 
getScope
@NotNull public final Project.ProjectScope getScope()
 
- 
getRepository
@NotNull public final SRepository getRepository()
- Specified by:
 getRepositoryin interfaceIProject- Specified by:
 getRepositoryin interfaceProject- Returns:
 - the project repository which contains all the project modules
 
 
- 
getModelAccess
@NotNull public final ModelAccess getModelAccess()
Shorthand forgetRepository().getModelAccess()- Specified by:
 getModelAccessin interfaceIProject- Specified by:
 getModelAccessin interfaceProject- Returns:
 - access facility to models coming from a 
repositoryassociated with this project. 
 
- 
getComponent
public abstract <T> T getComponent(Class<T> t)
Description copied from interface:IProjectGeneric extension mechanism- Specified by:
 getComponentin interfaceIProject- Returns:
 - component instance or 
nullif no extension of specified kind found. 
 
- 
getProjectFile
@Deprecated public File getProjectFile()
Deprecated.the project is not necessarily backed up by file. Left for compatibility- See Also:
 FileBasedProject
 
- 
getModules
@NotNull @Deprecated public final Iterable<? extends SModule> getModules()
Deprecated.use {@link #getProjectModules)} instead AP fixme : why to return Iterable extends>? isn't it easier to give out a collection, e.g. a list? 
- 
getProjectModulesWithGenerators
@NotNull public final List<SModule> getProjectModulesWithGenerators()
 
- 
getModulesWithGenerators
@Deprecated @NotNull public final Iterable<? extends SModule> getModulesWithGenerators()
Deprecated.usegetProjectModulesWithGenerators()instead 
- 
getProjectModules
@NotNull public final <T extends SModule> List<T> getProjectModules(Class<T> moduleClass)
Note, call#getProjectModules(SModule.class)is ambiguous, as it doesn't return generators that live under a project's language despite the fact Generator is instaoce of SModule, indeed. 
- 
isHidden
public final boolean isHidden()
- Specified by:
 isHiddenin interfaceMPSModuleOwner- Returns:
 - the 'hidden' status for the different kinds of owners. visibility has strict definition here, however I suppose that the owner is hidden implicates that its modules are not visible to a user (module properties dialog, etc.).
 
 
- 
dispose
public void dispose()
closes and disposes the project 
- 
isDisposed
public boolean isDisposed()
 
 - 
 
 -