Class ReconnectCommand
java.lang.Object
org.eclipse.gef.commands.Command
org.eclipse.graphiti.ui.internal.command.AbstractCommand
org.eclipse.graphiti.ui.internal.command.ReconnectCommand
- All Implemented Interfaces:
IContextHolder
,IFeatureAndContext
,IFeatureHolder
,IConfigurationProviderHolder
-
Constructor Summary
ConstructorDescriptionReconnectCommand
(IConfigurationProvider configurationProvider, Connection connection, Anchor oldAnchor, Anchor newAnchor, PictogramElement newTargetPictogramElement, String reconnectType, org.eclipse.draw2d.geometry.Point location) Instantiate a command that can reconnect a Connection instance to a different source or target endpoint. -
Method Summary
Methods inherited from class org.eclipse.graphiti.ui.internal.command.AbstractCommand
getConfigurationProvider, getFeatureProvider, getTransactionalEditingDomain
Methods inherited from class org.eclipse.gef.commands.Command
canRedo, chain, dispose, getDebugLabel, getLabel, redo, setDebugLabel, setLabel, undo
-
Constructor Details
-
ReconnectCommand
public ReconnectCommand(IConfigurationProvider configurationProvider, Connection connection, Anchor oldAnchor, Anchor newAnchor, PictogramElement newTargetPictogramElement, String reconnectType, org.eclipse.draw2d.geometry.Point location) Instantiate a command that can reconnect a Connection instance to a different source or target endpoint.- Parameters:
conn
- the connection instance to reconnect (non-null)- Throws:
IllegalArgumentException
- if conn is null
-
-
Method Details
-
canExecute
public boolean canExecute()- Overrides:
canExecute
in classorg.eclipse.gef.commands.Command
-
canUndo
public boolean canUndo()- Overrides:
canUndo
in classorg.eclipse.gef.commands.Command
-
execute
public void execute()Reconnect the connection to newSource (if setNewSource(...) was invoked before) or newTarget (if setNewTarget(...) was invoked before).- Overrides:
execute
in classorg.eclipse.gef.commands.Command
-
getFeature
Description copied from interface:IFeatureHolder
Gets the feature.- Specified by:
getFeature
in interfaceIFeatureHolder
- Returns:
- the feature
-
getContext
Description copied from interface:IContextHolder
Gets the context.- Specified by:
getContext
in interfaceIContextHolder
- Returns:
- the context
-
deactivate
public void deactivate()
-