|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.core.commands.operations.AbstractOperation
org.eclipse.emf.workspace.AbstractEMFOperation
org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand
org.eclipse.gmf.runtime.diagram.ui.commands.DeferredCreateConnectionViewCommand
This command is used to create a connection view between two editparts, when only the view adapters are available at the time of creating the command. The editparts are required to get the correct create connection command, so this command defers getting the create connection command until execution time at which point it can get the editparts from the editpart registry and the view adapters.
| Field Summary | |
protected EObject |
element
the element for the connection's semantic element |
protected PreferencesHint |
preferencesHint
The hint used to find the appropriate preference store from which general diagramming preference values for properties of shapes, connections, and diagrams can be retrieved. |
protected java.lang.String |
semanticHint
the connection's semantic hint |
protected IAdaptable |
sourceViewAdapter
the source adapter from which a View can be retrieved |
protected IAdaptable |
targetViewAdapter
the target adapter from which a View can be retrieved |
protected EditPartViewer |
viewer
the graphical viewer used to get the editpart registry |
| Constructor Summary | |
DeferredCreateConnectionViewCommand(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain,
EObject element,
IAdaptable sourceViewAdapter,
IAdaptable targetViewAdapter,
EditPartViewer viewer,
PreferencesHint preferencesHint)
Constructor for DeferredCreateConnectionViewCommand. |
|
DeferredCreateConnectionViewCommand(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain,
java.lang.String semanticHint,
IAdaptable sourceViewAdapter,
IAdaptable targetViewAdapter,
EditPartViewer viewer,
PreferencesHint preferencesHint)
Constructor for DeferredCreateConnectionViewCommand.
|
|
| Method Summary | |
protected CommandResult |
doExecuteWithResult(IProgressMonitor progressMonitor,
IAdaptable info)
Finds the source and target editparts by extracting the views from the view adapaters and searching in the editpart viewer. |
java.util.List |
getAffectedFiles()
Returns the IFiles for resources that may be modified when the
operation is executed, undone or redone. |
| Methods inherited from class org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand |
aggregateStatuses, cleanup, compose, didRedo, didUndo, doExecute, doRedo, doUndo, getCommandResult, getWorkspaceFiles, getWorkspaceFiles, internalSetResult, reduce, setResult |
| Methods inherited from class org.eclipse.emf.workspace.AbstractEMFOperation |
canRedo, canUndo, didCommit, dispose, execute, getChange, getEditingDomain, getOptions, redo, undo |
| Methods inherited from class org.eclipse.core.commands.operations.AbstractOperation |
addContext, canExecute, getContexts, getLabel, hasContext, removeContext, setLabel, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.core.commands.operations.IUndoableOperation |
addContext, canExecute, canRedo, canUndo, dispose, execute, getContexts, getLabel, hasContext, redo, removeContext, undo |
| Field Detail |
protected EObject element
protected java.lang.String semanticHint
protected IAdaptable sourceViewAdapter
protected IAdaptable targetViewAdapter
protected EditPartViewer viewer
protected PreferencesHint preferencesHint
DiagramPreferencesRegistry.
| Constructor Detail |
public DeferredCreateConnectionViewCommand(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain,
EObject element,
IAdaptable sourceViewAdapter,
IAdaptable targetViewAdapter,
EditPartViewer viewer,
PreferencesHint preferencesHint)
DeferredCreateConnectionViewCommand.
editingDomain - the editing domain through which model changes are madeelement - the connection's semantic elementsourceViewAdapter - adapter from which the source view can be retrievedtargetViewAdapter - adapter from which the target view can be retrievedviewer - the viewer used to get the editpart registry
public DeferredCreateConnectionViewCommand(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain,
java.lang.String semanticHint,
IAdaptable sourceViewAdapter,
IAdaptable targetViewAdapter,
EditPartViewer viewer,
PreferencesHint preferencesHint)
DeferredCreateConnectionViewCommand.
Passing in the semanticHint allows for the creation of a connection view
without a semantic element.
editingDomain - the editing domain through which model changes are madesemanticHint - the connection's semantic hintsourceViewAdapter - adapter from which the source view can be retrievedtargetViewAdapter - adapter from which the target view can be retrievedviewer - the viewer used to get the editpart registry| Method Detail |
public java.util.List getAffectedFiles()
AbstractTransactionalCommandIFiles for resources that may be modified when the
operation is executed, undone or redone.
getAffectedFiles in interface ICommandgetAffectedFiles in class AbstractTransactionalCommand
protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor,
IAdaptable info)
throws ExecutionException
doExecuteWithResult in class AbstractTransactionalCommandprogressMonitor - the progress monitor provided by the operation historyinfo - the adaptable provided by the operation history
ExecutionException - if, for some reason, I fail to complete
the operation
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.