protected abstract class WrapperItemProvider.SimpleCopyCommand extends AbstractOverrideableCommand
copy
to do the copying.AbstractCommand.NonDirtying
Modifier and Type | Field and Description |
---|---|
protected java.util.Collection<?> |
affectedObjects |
protected java.util.Collection<?> |
result |
domain, overrideCommand
description, isExecutable, isPrepared, label
Constructor and Description |
---|
WrapperItemProvider.SimpleCopyCommand(EditingDomain domain)
Creates an instance for the given domain.
|
Modifier and Type | Method and Description |
---|---|
abstract IWrapperItemProvider |
copy()
Concrete subclasses must implement this to copy and return the value and wrapper.
|
void |
doExecute()
|
java.util.Collection<?> |
doGetAffectedObjects()
Returns a list containing only the original wrapper itself.
|
java.util.Collection<?> |
doGetResult()
If the command has executed, returns a list containing only the copy of the wrapper.
|
void |
doRedo()
Does nothing.
|
void |
doUndo()
Does nothing.
|
protected boolean |
prepare()
Returns true; this command can requires now preparation and can always be executed.
|
canExecute, canUndo, dispose, doCanExecute, doCanUndo, doDispose, doGetChildrenToCopy, doGetDescription, doGetLabel, execute, getAffectedObjects, getChildrenToCopy, getDescription, getDomain, getLabel, getOverride, getOwnerList, getResult, redo, setOverride, toString, undo, updateEMap
chain, setDescription, setLabel
protected java.util.Collection<?> result
protected java.util.Collection<?> affectedObjects
public WrapperItemProvider.SimpleCopyCommand(EditingDomain domain)
protected boolean prepare()
prepare
in class AbstractCommand
public void doExecute()
copy()
to do the copying, disposes
the copy, and sets it to
be the result of the command. Since the copy has not been created within the viewed model, it should never do
any kind of notification, which is why it is immediately disposed.doExecute
in interface OverrideableCommand
doExecute
in class AbstractOverrideableCommand
public abstract IWrapperItemProvider copy()
public void doUndo()
doUndo
in interface OverrideableCommand
doUndo
in class AbstractOverrideableCommand
public void doRedo()
doRedo
in interface OverrideableCommand
doRedo
in class AbstractOverrideableCommand
public java.util.Collection<?> doGetResult()
doGetResult
in interface OverrideableCommand
doGetResult
in class AbstractOverrideableCommand
public java.util.Collection<?> doGetAffectedObjects()
doGetAffectedObjects
in interface OverrideableCommand
doGetAffectedObjects
in class AbstractOverrideableCommand