|
||||||||||
| PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.eclipse.emf.common.command.AbstractCommand
|
+--org.eclipse.emf.mapping.command.CreateCopyOverrideCommand
This command overrides the CreateCopyCommand for cross-domain copies.
| Field Summary | |
|---|---|
protected EObject |
copy
This is the copy. |
protected CopyCommand.Helper |
copyHelper
This is a map of objects to their copies |
protected MappingDomain |
mappingDomain
This keeps track of the mapping domain in which the command operates. |
protected EObject |
owner
This is the object being copied. |
| Fields inherited from class org.eclipse.emf.common.command.AbstractCommand |
|---|
description, isExecutable, isPrepared, label |
| Constructor Summary | |
|---|---|
CreateCopyOverrideCommand(MappingDomain domain,
CreateCopyCommand createCommand)
This creates a command instance that creates a copy of owner. |
|
| Method Summary | |
|---|---|
void |
execute()
Performs the command activity required for the effect. |
java.util.Collection |
getChildrenToCopy()
|
java.util.Collection |
getResult()
Returns an empty list. |
protected boolean |
prepare()
Called at most once in AbstractCommand.canExecute() to give the command an opportunity to ready itself for execution. |
void |
redo()
Performs the command activity required to redo the effect after undoing the effect. |
java.lang.String |
toString()
This gives an abbreviated name using this object's own class' name, without package qualification, followed by a space separated list of field:value pairs. |
void |
undo()
Throws a runtime exception. |
| Methods inherited from class org.eclipse.emf.common.command.AbstractCommand |
|---|
canExecute, canUndo, chain, dispose, getAffectedObjects, getDescription, getLabel, setDescription, setLabel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected MappingDomain mappingDomain
protected EObject owner
protected EObject copy
protected CopyCommand.Helper copyHelper
| Constructor Detail |
public CreateCopyOverrideCommand(MappingDomain domain,
CreateCopyCommand createCommand)
| Method Detail |
protected boolean prepare()
AbstractCommandAbstractCommand.canExecute() to give the command an opportunity to ready itself for execution.
The returned value is stored in AbstractCommand.canExecute().
In other words, you can override this method to initialize
and to yield a cached value for the all subsequent calls to canExecute.prepare in class AbstractCommandorg.eclipse.emf.common.command.AbstractCommandpublic void execute()
Commandexecute when canExecute returns false,
or when canExecute hasn't been called, is undefined.public void undo()
AbstractCommandundo in class AbstractCommandorg.eclipse.emf.common.command.AbstractCommandUnsupportedOperationException - always.public void redo()
Commandredo the effect after undoing the effect.
The effect, if any, of calling redo before undo is called is undefined.
Note that if you implement redo to call execute
then any derived class will be restricted by that decision also.public java.util.Collection getResult()
AbstractCommandgetResult in class AbstractCommandorg.eclipse.emf.common.command.AbstractCommandpublic java.util.Collection getChildrenToCopy()
getChildrenToCopy in interface ChildrenToCopyProviderpublic java.lang.String toString()
toString in class AbstractCommandorg.eclipse.emf.common.command.AbstractCommand
|
Copyright 2001-2003 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||