|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.common.command.AbstractCommand org.eclipse.emf.edit.command.AbstractOverrideableCommand org.eclipse.emf.edit.provider.WrapperItemProvider.SimpleCopyCommand
protected abstract class WrapperItemProvider.SimpleCopyCommand
A command base class for copying a simple value and the wrapper. This is useful when the value isn't able provide
an adapter to return a copy command, itself. This class just provides the scaffolding; concrete subclasses must
implement copy
to do the copying.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand |
---|
AbstractCommand.NonDirtying |
Field Summary | |
---|---|
protected java.util.Collection<?> |
affectedObjects
|
protected java.util.Collection<?> |
result
|
Fields inherited from class org.eclipse.emf.edit.command.AbstractOverrideableCommand |
---|
domain, overrideCommand |
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand |
---|
description, isExecutable, isPrepared, label |
Constructor Summary | |
---|---|
WrapperItemProvider.SimpleCopyCommand(EditingDomain domain)
Creates an instance for the given domain. |
Method Summary | |
---|---|
abstract IWrapperItemProvider |
copy()
Concrete subclasses must implement this to copy and return the value and wrapper. |
void |
doExecute()
Calls copy() to do the copying, disposes the copy, and sets it to
be the result of the command. |
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. |
Methods inherited from class org.eclipse.emf.edit.command.AbstractOverrideableCommand |
---|
canExecute, canUndo, dispose, doCanExecute, doCanUndo, doDispose, doGetChildrenToCopy, doGetDescription, doGetLabel, execute, getAffectedObjects, getChildrenToCopy, getDescription, getDomain, getLabel, getOverride, getOwnerList, getResult, redo, setOverride, toString, undo, updateEMap |
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand |
---|
chain, setDescription, setLabel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.emf.common.command.Command |
---|
chain |
Field Detail |
---|
protected java.util.Collection<?> result
protected java.util.Collection<?> affectedObjects
Constructor Detail |
---|
public WrapperItemProvider.SimpleCopyCommand(EditingDomain domain)
Method Detail |
---|
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
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |