Package jetbrains.mps.smodel
Class GlobalModelAccess
- java.lang.Object
 - 
- jetbrains.mps.smodel.ModelAccessBase
 - 
- jetbrains.mps.smodel.GlobalModelAccess
 
 
 
- 
- All Implemented Interfaces:
 ModelAccess
public class GlobalModelAccess extends ModelAccessBase
This class represents a ModelAccess for cases when there is no available project in scope. Therefore it lacks of some functionality: it does not support command execution. To run project-aware command useProjectModelAccesswhich is available throughProject.getModelAccess(). 
- 
- 
Constructor Summary
Constructors Constructor Description GlobalModelAccess() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuteCommand(Runnable r)Represents a write action executed with respect to platform undo mechanism.voidexecuteCommandInEDT(Runnable r)Represents a write action executed with respect to platform undo mechanism, runs asynchronously from EDT thread.voidexecuteUndoTransparentCommand(Runnable r)FIXME need thorough documentation Executed code has model write, is treated as a command, the only difference is that changes from the transparent action merged with the that of the previous undoable commandbooleanisCommandAction()- 
Methods inherited from class jetbrains.mps.smodel.ModelAccessBase
addCommandListener, addReadActionListener, addWriteActionListener, canRead, canWrite, checkReadAccess, checkWriteAccess, getDelegate, removeCommandListener, removeReadActionListener, removeWriteActionListener, runReadAction, runReadInEDT, runWriteAction, runWriteInEDT 
 - 
 
 - 
 
- 
- 
Method Detail
- 
executeCommand
public void executeCommand(Runnable r)
Description copied from interface:ModelAccessRepresents a write action executed with respect to platform undo mechanism. This method shall be invoked from EDT thread only. UnlikeModelAccess.executeCommandInEDT(Runnable), this method executes synchronously 
- 
executeCommandInEDT
public void executeCommandInEDT(Runnable r)
Description copied from interface:ModelAccessRepresents a write action executed with respect to platform undo mechanism, runs asynchronously from EDT thread. This method may be invoked from any thread. 
- 
executeUndoTransparentCommand
public void executeUndoTransparentCommand(Runnable r)
Description copied from interface:ModelAccessFIXME need thorough documentation Executed code has model write, is treated as a command, the only difference is that changes from the transparent action merged with the that of the previous undoable command 
- 
isCommandAction
public boolean isCommandAction()
- Returns:
 trueif there's a command (either withModelAccess.executeCommand(Runnable)orModelAccess.executeCommandInEDT(Runnable)) being executed
 
 - 
 
 -