org.eclipse.gmt.umlx.editor.command
Class DeferredCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by org.eclipse.gmt.umlx.editor.command.DeferredCommand
Direct Known Subclasses:
DeferredCreateFromOutlineCommand, DeferredCreateLinkCommand, DeferredCreateNodeCommand, DeferredReconnectCommand, DeferredReparentCommand

public abstract class DeferredCommand
extends org.eclipse.gef.commands.Command

A derived DeferredCommand accumulates the execution context of some command, which is created by getDeferredCommand(). The DeferredCommand should never be executed so it throws UnsupportedOperationException if it is.


Constructor Summary
DeferredCommand(java.lang.String label)
           
 
Method Summary
abstract  IAbstractCommand getDeferredCommand(ISheetEditor sheetEditor)
           
 IAbstractCommand getDeferredCommandOrNull(ISheetViewer sheetViewer)
           
 void redo()
           
 void undo()
           
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, canUndo, chain, dispose, execute, getDebugLabel, getLabel, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeferredCommand

public DeferredCommand(java.lang.String label)
Method Detail

getDeferredCommandOrNull

public IAbstractCommand getDeferredCommandOrNull(ISheetViewer sheetViewer)

getDeferredCommand

public abstract IAbstractCommand getDeferredCommand(ISheetEditor sheetEditor)
                                             throws PreparationFailureException
Throws:
PreparationFailureException

redo

public final void redo()
Overrides:
redo in class org.eclipse.gef.commands.Command

undo

public final void undo()
Overrides:
undo in class org.eclipse.gef.commands.Command