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

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by org.eclipse.gmt.umlx.editor.command.DeferredCommand
          extended by org.eclipse.gmt.umlx.editor.command.DeferredCreateLinkCommand
All Implemented Interfaces:
ILinkRegimeEnums

public class DeferredCreateLinkCommand
extends DeferredCommand
implements ILinkRegimeEnums

A DeferredCreateLinkCommand delays the creation of a link CreateCommand until it is ready to be executed, thereby avoiding the thrashing of commands to suit the prevailing cursor context.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.gmt.umlx.editor.regime.ILinkRegimeEnums
ILinkRegimeEnums.IsCreate, ILinkRegimeEnums.IsReconnect, ILinkRegimeEnums.IsReCreate
 
Constructor Summary
DeferredCreateLinkCommand(ILinkRegimeCo0<?,?,?,?> paletteRegime)
           
 
Method Summary
 IErrorMessage cannotCompleteLinkCommand(ISheetEditor editor, GModelElement gSource, GModelElement gTarget, boolean coShift, org.eclipse.draw2d.geometry.Point location)
           
 IErrorMessage cannotCreateLinkCommand(GModelElement gSource, boolean coShift)
           
<T,CS> ModelStateCommand
createCoTargetCommand(ISheetEditor sheetEditor, T target, CS coSource)
           
<T,CT> ModelStateCommand
createSetCoModelCommand(ISheetEditor sheetEditor, T target, java.lang.Object coTarget)
           
 IAbstractCommand getDeferredCommand(ISheetEditor sheetEditor)
           
 
Methods inherited from class org.eclipse.gmt.umlx.editor.command.DeferredCommand
getDeferredCommandOrNull, redo, 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

DeferredCreateLinkCommand

public DeferredCreateLinkCommand(ILinkRegimeCo0<?,?,?,?> paletteRegime)
Method Detail

cannotCompleteLinkCommand

public IErrorMessage cannotCompleteLinkCommand(ISheetEditor editor,
                                               GModelElement gSource,
                                               GModelElement gTarget,
                                               boolean coShift,
                                               org.eclipse.draw2d.geometry.Point location)

cannotCreateLinkCommand

public IErrorMessage cannotCreateLinkCommand(GModelElement gSource,
                                             boolean coShift)

createCoTargetCommand

public <T,CS> ModelStateCommand createCoTargetCommand(ISheetEditor sheetEditor,
                                                      T target,
                                                      CS coSource)

createSetCoModelCommand

public <T,CT> ModelStateCommand createSetCoModelCommand(ISheetEditor sheetEditor,
                                                        T target,
                                                        java.lang.Object coTarget)

getDeferredCommand

public IAbstractCommand getDeferredCommand(ISheetEditor sheetEditor)
                                    throws PreparationFailureException
Specified by:
getDeferredCommand in class DeferredCommand
Throws:
PreparationFailureException