|
Modelers | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gef.commands.Command
org.topcased.modeler.commands.RecordingChangeCommand
public abstract class RecordingChangeCommand
This command is based on the EMF ChangeRecorder. You just have to implement the doExecute method to manage undo/redo.
Constructor Summary | |
---|---|
RecordingChangeCommand(Resource resource)
Constructor |
|
RecordingChangeCommand(ResourceSet resourceSet)
Constructor |
Method Summary | |
---|---|
boolean |
canUndo()
I can undo if I have recorded any changes previously. |
void |
dispose()
|
protected abstract void |
doExecute()
Method to implement : execute the modifications on the model. |
void |
execute()
I run the runnable when I execute the first time. |
void |
redo()
Redoes by applying changes recorded in the last undo. |
void |
undo()
Undoes by applying recorded changes. |
Methods inherited from class org.eclipse.gef.commands.Command |
---|
canExecute, chain, getDebugLabel, getLabel, setDebugLabel, setLabel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RecordingChangeCommand(Resource resource)
resource
- The Resource to listenpublic RecordingChangeCommand(ResourceSet resourceSet)
resourceSet
- The Resource to listenMethod Detail |
---|
public void execute()
execute
in class org.eclipse.gef.commands.Command
protected abstract void doExecute()
public boolean canUndo()
canUndo
in class org.eclipse.gef.commands.Command
public void undo()
undo
in class org.eclipse.gef.commands.Command
public void redo()
redo
in class org.eclipse.gef.commands.Command
public void dispose()
dispose
in class org.eclipse.gef.commands.Command
Command.dispose()
|
Modelers | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.