Package jetbrains.mps.tool.environment
Class AbstractEnvironment
- java.lang.Object
 - 
- jetbrains.mps.tool.environment.AbstractEnvironment
 
 
- 
- All Implemented Interfaces:
 Environment
public abstract class AbstractEnvironment extends Object implements Environment
Base implementation class forEnvironmentwithout project handling or reference count, with mostly no-op orUnsupportedOperationExceptionimplementations. 
- 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractEnvironment(Platform mpsPlatform) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseProject(Project project)Discards previously opened project.ProjectcreateEmptyProject()Creates and opens an empty projectProjectcreateProject(ProjectStrategy strategy)Creates a project and opens it according to the given strategyvoiddispose()disposes the environment for real, does not consider ref countsvoidflushAllEvents()flushes all #invokeAndLater calls and all ModelAccess event queue if neededPlatformgetPlatform()ProjectopenProject(File projectFile) 
 - 
 
- 
- 
Constructor Detail
- 
AbstractEnvironment
protected AbstractEnvironment(Platform mpsPlatform)
 
 - 
 
- 
Method Detail
- 
getPlatform
public Platform getPlatform()
- Specified by:
 getPlatformin interfaceEnvironment- Returns:
 - MPS (its platform aspect) of this tooling environment, not null when initialized.
 
 
- 
createEmptyProject
@NotNull public Project createEmptyProject()
Description copied from interface:EnvironmentCreates and opens an empty project- Specified by:
 createEmptyProjectin interfaceEnvironment- Returns:
 - newly created Project.
 
 
- 
createProject
@NotNull public Project createProject(@NotNull ProjectStrategy strategy)
Description copied from interface:EnvironmentCreates a project and opens it according to the given strategy- Specified by:
 createProjectin interfaceEnvironment- Returns:
 - newly created Project constructed as the strategy suggests. It is already opened.
 
 
- 
openProject
@NotNull public Project openProject(@NotNull File projectFile)
- Specified by:
 openProjectin interfaceEnvironment
 
- 
closeProject
public void closeProject(@NotNull Project project)
Description copied from interface:EnvironmentDiscards previously opened project. Environment does its best to close the project but may choose to ignore request in certain scenarions (like in-process test execution, when closing an active project may affect user experience)- Specified by:
 closeProjectin interfaceEnvironment- Parameters:
 project- an instance obtained fromEnvironment.openProject(java.io.File)
 
- 
dispose
public void dispose()
Description copied from interface:Environmentdisposes the environment for real, does not consider ref counts- Specified by:
 disposein interfaceEnvironment
 
- 
flushAllEvents
public void flushAllEvents()
Description copied from interface:Environmentflushes all #invokeAndLater calls and all ModelAccess event queue if needed- Specified by:
 flushAllEventsin interfaceEnvironment
 
 - 
 
 -