org.eclipse.emf.ecoretools.diagram.edit.policies
Class OpenDiagramEditPolicy.OpenDiagramCommand
java.lang.Object
org.eclipse.core.commands.operations.AbstractOperation
org.eclipse.emf.workspace.AbstractEMFOperation
org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand
org.eclipse.emf.ecoretools.diagram.edit.policies.OpenDiagramEditPolicy.OpenDiagramCommand
- All Implemented Interfaces:
- org.eclipse.core.commands.operations.IUndoableOperation, org.eclipse.gmf.runtime.common.core.command.ICommand, org.eclipse.gmf.runtime.common.core.internal.command.ICommandWithSettableResult
- Enclosing class:
- OpenDiagramEditPolicy
public static class OpenDiagramEditPolicy.OpenDiagramCommand
- extends org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand
This command open a Dialog used to manage existing diagrams. It is
possible to create new one, delete/rename an existing one, or open the
selected in a new editor.
Method Summary |
protected org.eclipse.gmf.runtime.notation.Diagram |
createPressed(boolean initializeContent)
|
protected void |
deletePressed(org.eclipse.gmf.runtime.notation.Diagram diagram)
|
protected org.eclipse.gmf.runtime.common.core.command.CommandResult |
doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor monitor,
org.eclipse.core.runtime.IAdaptable info)
|
protected org.eclipse.emf.ecore.EObject |
getDiagramDomainElement()
|
protected java.lang.String |
getDiagramKind()
|
protected java.lang.String |
getEditorID()
|
protected org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint |
getPreferencesHint()
|
protected org.eclipse.gmf.runtime.notation.Diagram |
intializeNewDiagram(boolean initializeContent)
|
protected void |
openEditor(org.eclipse.gmf.runtime.notation.Diagram diagram)
|
Methods inherited from class org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand |
aggregateStatuses, cleanup, compose, didRedo, didUndo, doExecute, doRedo, doUndo, getAffectedFiles, getCommandResult, getWorkspaceFiles, getWorkspaceFiles, internalSetResult, reduce, setResult |
Methods inherited from class org.eclipse.emf.workspace.AbstractEMFOperation |
canRedo, canSetOptions, canUndo, didCommit, dispose, execute, getChange, getEditingDomain, getOptions, isReuseParentTransaction, redo, setOptions, setReuseParentTransaction, 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.gmf.runtime.common.core.command.ICommand |
setLabel |
Methods inherited from interface org.eclipse.core.commands.operations.IUndoableOperation |
addContext, canExecute, canRedo, canUndo, dispose, execute, getContexts, getLabel, hasContext, redo, removeContext, undo |
OpenDiagramEditPolicy.OpenDiagramCommand
public OpenDiagramEditPolicy.OpenDiagramCommand(org.eclipse.emf.ecore.EObject domainElt,
org.eclipse.emf.ecore.resource.Resource diagResource)
- Constructor
- Parameters:
domainElt
- the domain element on which the diagram should be
associateddiagResource
-
doExecuteWithResult
protected org.eclipse.gmf.runtime.common.core.command.CommandResult doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor monitor,
org.eclipse.core.runtime.IAdaptable info)
throws org.eclipse.core.commands.ExecutionException
- Specified by:
doExecuteWithResult
in class org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand
- Throws:
org.eclipse.core.commands.ExecutionException
- See Also:
AbstractTransactionalCommand.doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor,
org.eclipse.core.runtime.IAdaptable)
openEditor
protected void openEditor(org.eclipse.gmf.runtime.notation.Diagram diagram)
- Parameters:
diagram
-
createPressed
protected org.eclipse.gmf.runtime.notation.Diagram createPressed(boolean initializeContent)
- Parameters:
initializeContent
-
- Returns:
- Diagram
deletePressed
protected void deletePressed(org.eclipse.gmf.runtime.notation.Diagram diagram)
- Parameters:
diagram
-
intializeNewDiagram
protected org.eclipse.gmf.runtime.notation.Diagram intializeNewDiagram(boolean initializeContent)
throws org.eclipse.core.commands.ExecutionException
- Parameters:
initializeContent
-
- Returns:
- Diagram
- Throws:
org.eclipse.core.commands.ExecutionException
getDiagramDomainElement
protected org.eclipse.emf.ecore.EObject getDiagramDomainElement()
getPreferencesHint
protected org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint getPreferencesHint()
getDiagramKind
protected java.lang.String getDiagramKind()
getEditorID
protected java.lang.String getEditorID()