Package jetbrains.mps.smodel.tempmodel
Class TemporaryModels
- java.lang.Object
 - 
- jetbrains.mps.smodel.tempmodel.TemporaryModels
 
 
- 
public class TemporaryModels extends Object
This class is for creating temporary models. This is useful when one wants to write some code for further passing it to IDE instead of storing as source code. Temporary models should not be shown in project tree, find usages dialog, hierarchy view and all other views Temporary model isEditableSModel, could be modified, and dispatches change notifications. It's not possible to save temporary model as its data source is void. For the time being, there's a hack that the model doesn't report its changed stateEditableSModel.isChanged(). 
- 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMissingImports(SModel model)SModelcreate(boolean readOnly, boolean trackUndo, TempModuleOptions mp)SModelcreate(boolean readOnly, TempModuleOptions mp)voiddispose(SModel model)static TemporaryModelsgetInstance()static booleanisTemporary(SModel model) 
 - 
 
- 
- 
Method Detail
- 
getInstance
public static TemporaryModels getInstance()
 
- 
create
public SModel create(boolean readOnly, @NotNull TempModuleOptions mp)
 
- 
create
public SModel create(boolean readOnly, boolean trackUndo, @NotNull TempModuleOptions mp)
 
- 
addMissingImports
public void addMissingImports(SModel model)
 
- 
dispose
public void dispose(SModel model)
 
- 
isTemporary
public static boolean isTemporary(SModel model)
 
 - 
 
 -