public class AddUMLDiagramCommand
extends org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand
implements org.eclipse.gmf.runtime.common.core.command.ICommand
| Modifier and Type | Field and Description |
|---|---|
protected org.eclipse.emf.ecore.EObject |
redefinitionContextHint |
| Constructor and Description |
|---|
AddUMLDiagramCommand(java.lang.String label,
org.eclipse.uml2.uml.Namespace namespace,
org.eclipse.gmf.runtime.notation.Diagram diagram,
boolean mainDiagram)
Constructs a new command instance that will attach an existing diagram to
a given namespace.
|
AddUMLDiagramCommand(java.lang.String label,
org.eclipse.uml2.uml.Namespace namespace,
org.eclipse.emf.ecore.EObject redefinitionContextHint,
UMLDiagramKind umlDiagramKindType,
org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint preferencesHint,
boolean mainDiagram)
Constructs a new command instance that will attach an existing diagram to
a given namespace.
|
AddUMLDiagramCommand(java.lang.String label,
org.eclipse.uml2.uml.Namespace namespace,
UMLDiagramKind umlDiagramKindType,
org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint preferencesHint,
boolean mainDiagram)
Constructs a new command instance that will create a new UML diagram and
attach it to a given namespace.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canExecute() |
protected org.eclipse.gmf.runtime.common.core.command.CommandResult |
doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor progressMonitor,
org.eclipse.core.runtime.IAdaptable info) |
protected org.eclipse.gmf.runtime.notation.Diagram |
getDiagram() |
protected org.eclipse.uml2.uml.Namespace |
getNamespace() |
protected java.lang.String |
getUmlDiagramKindDisplayName() |
protected UMLDiagramKind |
getUmlDiagramKindType() |
aggregateStatuses, cleanup, compose, didRedo, didUndo, doExecute, doRedo, doUndo, getAffectedFiles, getCommandResult, getWorkspaceFiles, getWorkspaceFiles, internalSetResult, reduce, setResultcanRedo, canSetOptions, canUndo, didCommit, dispose, execute, getChange, getEditingDomain, getOptions, isReuseParentTransaction, redo, setOptions, setReuseParentTransaction, undoaddContext, getContexts, getLabel, hasContext, removeContext, setLabel, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprotected org.eclipse.emf.ecore.EObject redefinitionContextHint
public AddUMLDiagramCommand(java.lang.String label,
org.eclipse.uml2.uml.Namespace namespace,
UMLDiagramKind umlDiagramKindType,
org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint preferencesHint,
boolean mainDiagram)
label - the command labelnamespace - the namespace that will own the new diagramumlDiagramKindType - the kind of diagram to createpreferencesHint - The preference hint that is to be used to find the appropriate
preference store from which to retrieve diagram preference
values. The preference hint is mapped to a preference store in
the preference registry <@link DiagramPreferencesRegistry>.mainDiagram - true if this diagram is the main diagram in
namespace, false otherwise. The
main diagram will be named 'Main'.public AddUMLDiagramCommand(java.lang.String label,
org.eclipse.uml2.uml.Namespace namespace,
org.eclipse.gmf.runtime.notation.Diagram diagram,
boolean mainDiagram)
label - the command labelnamespace - the namespace that will own the new diagramdiagram - the diagram to add to the namespacemainDiagram - true if this diagram is the main diagram in
namespace, false otherwise. The
main diagram will be named 'Main'.public AddUMLDiagramCommand(java.lang.String label,
org.eclipse.uml2.uml.Namespace namespace,
org.eclipse.emf.ecore.EObject redefinitionContextHint,
UMLDiagramKind umlDiagramKindType,
org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint preferencesHint,
boolean mainDiagram)
label - the command labelnamespace - the namespace that will own the new diagramredefinitionContextHint - redefinition context hintumlDiagramKindType - kind of UML diagrampreferencesHint - preferences for how to create the new diagrammainDiagram - true if this diagram is the main diagram in
namespace, false otherwise. The
main diagram will be named 'Main'.protected org.eclipse.gmf.runtime.common.core.command.CommandResult doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor progressMonitor,
org.eclipse.core.runtime.IAdaptable info)
throws org.eclipse.core.commands.ExecutionException
doExecuteWithResult in class org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommandorg.eclipse.core.commands.ExecutionExceptionpublic boolean canExecute()
canExecute in interface org.eclipse.core.commands.operations.IUndoableOperationcanExecute in class org.eclipse.core.commands.operations.AbstractOperationprotected org.eclipse.gmf.runtime.notation.Diagram getDiagram()
protected org.eclipse.uml2.uml.Namespace getNamespace()
protected UMLDiagramKind getUmlDiagramKindType()
protected java.lang.String getUmlDiagramKindDisplayName()