org.eclipse.gmt.umlx.editor.commands
Class ModelStateCommand<T extends IModelState>

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by org.eclipse.gmt.umlx.editor.command.AbstractCommand
          extended by org.eclipse.gmt.umlx.editor.commands.ModelStateCommand<T>
All Implemented Interfaces:
IAbstractCommand, IModelStateCommand<T>
Direct Known Subclasses:
CreateCommand, DeleteCommand, ReconnectCommand

public class ModelStateCommand<T extends IModelState>
extends AbstractCommand
implements IModelStateCommand<T>


Constructor Summary
ModelStateCommand(java.lang.String labelPrefix, T modelState)
           
 
Method Summary
 void addSelectedObjects(java.util.Collection<java.lang.Object> selectedObjects, boolean isDone)
           
 void doRedo()
          (re)-execute the command.
 void doUndo()
          un-execute the command.
 T getModelState()
           
 void setHasSelection(boolean hasSelection)
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.gmt.umlx.editor.command.AbstractCommand
canExecute, canUndo, couldNotUnlock, diagnoseCannotExecute, dispose, execute, getCommand, prepare, prepare, redo, requestModification, undo
 
Methods inherited from class org.eclipse.gef.commands.Command
chain, getDebugLabel, getLabel, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.command.IAbstractCommand
canExecute, canUndo, couldNotUnlock, diagnoseCannotExecute, dispose, execute, getCommand, getLabel, prepare, prepare, redo, requestModification, undo
 

Constructor Detail

ModelStateCommand

public ModelStateCommand(java.lang.String labelPrefix,
                         T modelState)
Method Detail

addSelectedObjects

public void addSelectedObjects(java.util.Collection<java.lang.Object> selectedObjects,
                               boolean isDone)
Specified by:
addSelectedObjects in interface IAbstractCommand
Overrides:
addSelectedObjects in class AbstractCommand

doRedo

public final void doRedo()
Description copied from class: AbstractCommand
(re)-execute the command.


doUndo

public final void doUndo()
Description copied from class: AbstractCommand
un-execute the command.


getModelState

public T getModelState()
Specified by:
getModelState in interface IModelStateCommand<T extends IModelState>

setHasSelection

public void setHasSelection(boolean hasSelection)
Specified by:
setHasSelection in interface IModelStateCommand<T extends IModelState>

toString

public java.lang.String toString()
Overrides:
toString in class AbstractCommand