|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.common.command.BasicCommandStack
org.eclipse.emf.mapping.command.PersistentCommandStack
public class PersistentCommandStack
This implementation of a command stack records the command class and command parameter used to create each command. This information can be used to create and execute all the commands again in a different session.
Nested Class Summary | |
---|---|
static class |
PersistentCommandStack.CommandCreationRecord
This records and encodes the command class and command parameter. |
static class |
PersistentCommandStack.Decoder
|
static class |
PersistentCommandStack.Encoder
|
Field Summary | |
---|---|
protected java.lang.ClassLoader |
classLoader
|
protected java.util.HashMap<Command,PersistentCommandStack.CommandCreationRecord> |
commandCreationMap
This keeps track of the mapping between commands and their PersistentCommandStack.CommandCreationRecord s. |
protected MappingDomain |
domain
|
protected java.lang.String |
encoding
|
Fields inherited from class org.eclipse.emf.common.command.BasicCommandStack |
---|
commandList, listeners, mostRecentCommand, saveIndex, top |
Constructor Summary | |
---|---|
PersistentCommandStack(java.lang.ClassLoader classLoader)
This constructs and instance of a command stack that records commands using a persistent encoding. |
Method Summary | |
---|---|
protected PersistentCommandStack.Decoder |
createDecoder(MappingRoot mappingRoot,
ResourceSet resourceSet,
java.lang.ClassLoader classLoader)
You can overide this to create your own type of decoder. |
protected PersistentCommandStack.Encoder |
createEncoder()
You can overide this to create your own type of encoder. |
void |
execute(Command command)
This override of execute calls PersistentCommandStack.CommandCreationRecord.encode(org.eclipse.emf.mapping.command.PersistentCommandStack.Encoder) just before normal execution by super. |
protected void |
executeEncoding()
|
java.lang.String |
getEncoding()
|
void |
handleCreateCommand(java.lang.Class<? extends Command> commandClass,
CommandParameter commandParameter,
Command command)
This is called by the mapping domain whenever a command (that may subsequently be executed) is created. |
void |
setEncoding(MappingDomain domain,
java.lang.String encoding)
|
Methods inherited from class org.eclipse.emf.common.command.BasicCommandStack |
---|
addCommandStackListener, canRedo, canUndo, flush, getMostRecentCommand, getRedoCommand, getUndoCommand, handleError, isSaveNeeded, notifyListeners, redo, removeCommandStackListener, saveIsDone, undo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.HashMap<Command,PersistentCommandStack.CommandCreationRecord> commandCreationMap
PersistentCommandStack.CommandCreationRecord
s.
protected MappingDomain domain
protected java.lang.ClassLoader classLoader
protected java.lang.String encoding
Constructor Detail |
---|
public PersistentCommandStack(java.lang.ClassLoader classLoader)
Method Detail |
---|
public void handleCreateCommand(java.lang.Class<? extends Command> commandClass, CommandParameter commandParameter, Command command)
protected PersistentCommandStack.Encoder createEncoder()
protected PersistentCommandStack.Decoder createDecoder(MappingRoot mappingRoot, ResourceSet resourceSet, java.lang.ClassLoader classLoader)
public void execute(Command command)
PersistentCommandStack.CommandCreationRecord.encode(org.eclipse.emf.mapping.command.PersistentCommandStack.Encoder)
just before normal execution by super.
execute
in interface CommandStack
execute
in class BasicCommandStack
command
- the command to execute.public java.lang.String getEncoding()
public void setEncoding(MappingDomain domain, java.lang.String encoding)
protected void executeEncoding()
|
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 |