Package jetbrains.mps.smodel
Class SNodeUndoableAction
- java.lang.Object
 - 
- jetbrains.mps.smodel.SNodeUndoableAction
 
 
- 
public abstract class SNodeUndoableAction extends Object
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSNodeUndoableAction.VFSChange 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedSNodeUndoableAction(SNode affectedNode) 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract voiddoRedo()protected abstract voiddoUndo()SNodegetAffectedNode()SNodeUndoableAction.VFSChangegetAssociatedVfsChange()SomeSNodeUndoableActions may cause VFS state change.booleanhasVirtualFile()Deprecated.since MPS 2017.3 all undo actions are associated with virtual files.booleanisGlobal()Deprecated.since MPS 2017.3 usegetAssociatedVfsChange()instead.voidredo()voidundo() 
 - 
 
- 
- 
Constructor Detail
- 
SNodeUndoableAction
protected SNodeUndoableAction(SNode affectedNode)
 
 - 
 
- 
Method Detail
- 
getAffectedNode
public SNode getAffectedNode()
 
- 
hasVirtualFile
@Deprecated public boolean hasVirtualFile()
Deprecated.since MPS 2017.3 all undo actions are associated with virtual files. Not used anymore. 
- 
getAssociatedVfsChange
public SNodeUndoableAction.VFSChange getAssociatedVfsChange()
SomeSNodeUndoableActions may cause VFS state change. For example, new root node creation may potentially cause new VirtualFile creation. Root deletion, in turn, VirtualFile deletion. Such actions should return correspondingSNodeUndoableAction.VFSChangemember in order to indicate that VFS state may require update during undo/redo operations for such actions.It is supposed that only single file may be affected by such actions. This means, there is only one (same) virtual file available in NodeVirtualFileSystem for the node (all nodes), returned from UndoContext.getVirtualFileNodes() for such actions.
- Returns:
 - FILE_CREATED or FILE_DELETED for 
AddRootUndoableActionorRemoveRootUndoableActionin accordance. 
 
- 
doUndo
protected abstract void doUndo()
 
- 
doRedo
protected abstract void doRedo()
 
- 
undo
public final void undo()
 
- 
redo
public final void redo()
 
- 
isGlobal
@Deprecated public boolean isGlobal()
Deprecated.since MPS 2017.3 usegetAssociatedVfsChange()instead. 
 - 
 
 -