public class DuplicateUMLElementsCommand
extends org.eclipse.gmf.runtime.emf.commands.core.commands.DuplicateEObjectsCommand
The command returns a map which contains all the EObjects
that
were duplicated mapped to their new duplicated objects. This map can also be
retrieved prior to having executed the command (it will be populated when the
command is executed). NOTE: The keyset of this map is not just the original
objects passed in; more objects may have been duplicated as well (e.g.
contained objects).
Constructor and Description |
---|
DuplicateUMLElementsCommand(java.lang.String label,
java.util.List elementsToBeDuplicated)
Constructs a new duplicate UML elements command with the specified label
and list of UML elements.
|
DuplicateUMLElementsCommand(java.lang.String label,
java.util.List elementsToBeDuplicated,
java.util.Map allDuplicatedElementsMap)
Constructs a new duplicate UML elements command with the specified label
and list of UML elements.
|
DuplicateUMLElementsCommand(java.lang.String label,
java.util.List elementsToBeDuplicated,
java.util.Map allDuplicatedElementsMap,
java.lang.Object context)
Constructs a new duplicate UML elements command with the specified label
and list of UML elements, for the given context object.
|
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) |
getAllDuplicatedObjectsMap, getObjectsToBeDuplicated
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
public DuplicateUMLElementsCommand(java.lang.String label, java.util.List elementsToBeDuplicated, java.util.Map allDuplicatedElementsMap, java.lang.Object context)
label
- elementsToBeDuplicated
- allDuplicatedElementsMap
- context
- public DuplicateUMLElementsCommand(java.lang.String label, java.util.List elementsToBeDuplicated)
label
- The label for the new command.elementsToBeDuplicated
- The list of UML elements to be duplicated.public DuplicateUMLElementsCommand(java.lang.String label, java.util.List elementsToBeDuplicated, java.util.Map allDuplicatedElementsMap)
label
- The label for the new command.elementsToBeDuplicated
- The list of UML elements to be duplicated.allDuplicatedElementsMap
- An empty map to be populated with the duplicated objects.public boolean canExecute()
canExecute
in interface org.eclipse.core.commands.operations.IUndoableOperation
canExecute
in class org.eclipse.gmf.runtime.emf.commands.core.commands.DuplicateEObjectsCommand
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.commands.DuplicateEObjectsCommand
org.eclipse.core.commands.ExecutionException