public class ReconnectCommand extends AbstractCommand implements IFeatureAndContext
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canExecute() |
boolean |
canUndo() |
void |
deactivate() |
void |
execute()
Reconnect the connection to newSource (if setNewSource(...) was invoked
before) or newTarget (if setNewTarget(...) was invoked before).
|
IContext |
getContext()
Gets the context.
|
IFeature |
getFeature()
Gets the feature.
|
getConfigurationProvider
public ReconnectCommand(IConfigurationProvider configurationProvider, Connection connection, Anchor oldAnchor, Anchor newAnchor, PictogramElement newTargetPictogramElement, java.lang.String reconnectType, org.eclipse.draw2d.geometry.Point location)
conn
- the connection instance to reconnect (non-null)java.lang.IllegalArgumentException
- if conn is nullpublic boolean canExecute()
canExecute
in class org.eclipse.gef.commands.Command
public boolean canUndo()
canUndo
in class org.eclipse.gef.commands.Command
public void execute()
execute
in class org.eclipse.gef.commands.Command
public IFeature getFeature()
IFeatureHolder
getFeature
in interface IFeatureHolder
public IContext getContext()
IContextHolder
getContext
in interface IContextHolder
public void deactivate()