|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.emf.common.command.AbstractCommand
org.eclipse.emf.mapping.command.InitializeCopyOverrideCommand
This command overrides the InitializeCopyCommand for cross-domain copies. This implementation is a no-op unless the objects are suitable ECore classes, in which case it copies the name and possibly the eType. Application specific subclasses should override execute() to complete the initialization, if necessary.
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.emf.common.command.AbstractCommand |
AbstractCommand.NonDirtying |
| Field Summary | |
protected InitializeCopyCommand |
initializeCommand
This is command we're overriding |
protected MappingDomain |
mappingDomain
This keeps track of the mapping domain in which the command operates. |
| Fields inherited from class org.eclipse.emf.common.command.AbstractCommand |
description, isExecutable, isPrepared, label |
| Constructor Summary | |
InitializeCopyOverrideCommand(MappingDomain domain,
InitializeCopyCommand initializeCommand)
This creates a command instance that initializes a copied object |
|
| Method Summary | |
void |
execute()
Performs the command activity required for the effect. |
Collection |
getAffectedObjects()
Returns an empty list. |
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.
|
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, 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 InitializeCopyCommand initializeCommand
| Constructor Detail |
public InitializeCopyOverrideCommand(MappingDomain domain,
InitializeCopyCommand initializeCommand)
| 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 AbstractCommandpublic void execute()
Commandexecute when canExecute returns false,
or when canExecute hasn't been called, is undefined.
public void undo()
AbstractCommand
undo in interface Commandundo in class AbstractCommandpublic 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 Collection getResult()
AbstractCommand
getResult in interface CommandgetResult in class AbstractCommandpublic Collection getAffectedObjects()
AbstractCommand
getAffectedObjects in interface CommandgetAffectedObjects in class AbstractCommandpublic String toString()
toString in class AbstractCommand
|
Copyright 2001-2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||