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
public class ReconnectCommand extends AbstractCommand implements IFeatureAndContext
-
-
Constructor Summary
Constructors Constructor Description ReconnectCommand(IConfigurationProvider configurationProvider, Connection connection, Anchor oldAnchor, Anchor newAnchor, PictogramElement newTargetPictogramElement, java.lang.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanExecute()booleancanUndo()voiddeactivate()voidexecute()Reconnect the connection to newSource (if setNewSource(...) was invoked before) or newTarget (if setNewTarget(...) was invoked before).IContextgetContext()Gets the context.IFeaturegetFeature()Gets the feature.-
Methods inherited from class org.eclipse.graphiti.ui.internal.command.AbstractCommand
getConfigurationProvider, getFeatureProvider, getTransactionalEditingDomain
-
-
-
-
Constructor Detail
-
ReconnectCommand
public ReconnectCommand(IConfigurationProvider configurationProvider, Connection connection, Anchor oldAnchor, Anchor newAnchor, PictogramElement newTargetPictogramElement, java.lang.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:
java.lang.IllegalArgumentException- if conn is null
-
-
Method Detail
-
canExecute
public boolean canExecute()
- Overrides:
canExecutein classorg.eclipse.gef.commands.Command
-
canUndo
public boolean canUndo()
- Overrides:
canUndoin 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:
executein classorg.eclipse.gef.commands.Command
-
getFeature
public IFeature getFeature()
Description copied from interface:IFeatureHolderGets the feature.- Specified by:
getFeaturein interfaceIFeatureHolder- Returns:
- the feature
-
getContext
public IContext getContext()
Description copied from interface:IContextHolderGets the context.- Specified by:
getContextin interfaceIContextHolder- Returns:
- the context
-
deactivate
public void deactivate()
-
-