org.eclipse.gmf.runtime.diagram.ui.editpolicies
Class GraphicalNodeEditPolicy.PromptAndCreateConnectionCommand
java.lang.Object
org.eclipse.core.commands.operations.AbstractOperation
org.eclipse.gmf.runtime.common.core.command.AbstractCommand
org.eclipse.gmf.runtime.diagram.ui.commands.PopupMenuCommand
org.eclipse.gmf.runtime.diagram.ui.commands.CreateOrSelectElementCommand
org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy.PromptAndCreateConnectionCommand
- All Implemented Interfaces:
- ICommand, org.eclipse.gmf.runtime.common.core.internal.command.ICommandWithSettableResult, IUndoableOperation
- Enclosing class:
- GraphicalNodeEditPolicy
- protected class GraphicalNodeEditPolicy.PromptAndCreateConnectionCommand
- extends CreateOrSelectElementCommand
Gets a command that pops up a menu which allows the user to select which
type of connection to be created and then creates the connection. This
command uses
#getCommandForMenuSelection(Object, CreateConnectionRequest) on
the connection chosen to get the creation command.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GraphicalNodeEditPolicy.PromptAndCreateConnectionCommand
public GraphicalNodeEditPolicy.PromptAndCreateConnectionCommand(java.util.List content,
CreateConnectionRequest request)
- Creates a new instance.
- Parameters:
content - The list of items making up the content of the popup menu.request - The relevant create connection request.
doExecuteWithResult
protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor,
IAdaptable info)
throws ExecutionException
- Pops up the dialog with the content provided, gets the command to be
executed based on the user selection, and then executes the command.
- Overrides:
doExecuteWithResult in class CreateOrSelectElementCommand
- Throws:
ExecutionException- See Also:
org.eclipse.gmf.runtime.common.core.sandbox.AbstractCommand2#doExecute(org.eclipse.core.runtime.IProgressMonitor)
doUndoWithResult
protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor,
IAdaptable info)
throws ExecutionException
- Description copied from class:
AbstractCommand
- Performs the actual work of undoing this command. Subclasses must
implement this method to perform the undo.
- Overrides:
doUndoWithResult in class PopupMenuCommand
- Throws:
ExecutionException
doRedoWithResult
protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor,
IAdaptable info)
throws ExecutionException
- Description copied from class:
AbstractCommand
- Performs the actual work of redoing this command. Subclasses must
implement this method to perform the redo.
- Overrides:
doRedoWithResult in class PopupMenuCommand
- Throws:
ExecutionException
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.