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, setResult
canRedo, canSetOptions, canUndo, didCommit, dispose, execute, getChange, getEditingDomain, getOptions, isReuseParentTransaction, redo, setOptions, setReuseParentTransaction, undo
addContext, getContexts, getLabel, hasContext, removeContext, setLabel, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected 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 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'.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.AbstractTransactionalCommand
org.eclipse.core.commands.ExecutionException
public boolean canExecute()
canExecute
in interface org.eclipse.core.commands.operations.IUndoableOperation
canExecute
in class org.eclipse.core.commands.operations.AbstractOperation
protected org.eclipse.gmf.runtime.notation.Diagram getDiagram()
protected org.eclipse.uml2.uml.Namespace getNamespace()
protected UMLDiagramKind getUmlDiagramKindType()
protected java.lang.String getUmlDiagramKindDisplayName()