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.
|
getConfigurationProviderpublic 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.Commandpublic boolean canUndo()
canUndo in class org.eclipse.gef.commands.Commandpublic void execute()
execute in class org.eclipse.gef.commands.Commandpublic IFeature getFeature()
IFeatureHoldergetFeature in interface IFeatureHolderpublic IContext getContext()
IContextHoldergetContext in interface IContextHolderpublic void deactivate()