public class PersistentCommandStack extends BasicCommandStack
Modifier and Type | Class and Description |
---|---|
static class |
PersistentCommandStack.CommandCreationRecord
This records and encodes the command class and command parameter.
|
static class |
PersistentCommandStack.Decoder |
static class |
PersistentCommandStack.Encoder |
Modifier and Type | Field and Description |
---|---|
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 |
commandList, listeners, mostRecentCommand, saveIndex, top
Constructor and Description |
---|
PersistentCommandStack(java.lang.ClassLoader classLoader)
This constructs and instance of a command stack that records commands using a persistent encoding.
|
Modifier and Type | Method and Description |
---|---|
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) |
addCommandStackListener, canRedo, canUndo, flush, getMostRecentCommand, getRedoCommand, getUndoCommand, handleError, isSaveNeeded, notifyListeners, redo, removeCommandStackListener, saveIsDone, undo
protected java.util.HashMap<Command,PersistentCommandStack.CommandCreationRecord> commandCreationMap
PersistentCommandStack.CommandCreationRecord
s.protected MappingDomain domain
protected java.lang.ClassLoader classLoader
protected java.lang.String encoding
public PersistentCommandStack(java.lang.ClassLoader classLoader)
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()