Hi all,

I've become interested in antidote and have created a framework for
Undo/Redo which I'd like to include.
By including undo/redo at this stage it'll be easier for people implementing
new commands to facilitate this
feature. I have an implementation as follows:

1. Created a hidden module:
org.apache.tools.ant.gui.modules.UndoableEditMonitor which responds to
       - UndoableEditEvent
       - UndoEvent
       - RedoEvent

2. Created a new Interface UndoCommandItf which is implemented by
AbstractUndoableCommand, a subclass of AbstractCommand,
and posts UndoableEditEvents to the EventBus.

3. Created an Undo and Redo command which posts UndoEvent and RedoEvent to
the EventBus.

4. Adapted NewElementCmd to subclass AbstractUndoableCommand rather than
AbstractCommand
implementing undo() and redo(). This is a reference implementation --- I'm
more than happy to adapt other commands ---
which shows how to facilitate undo/redo.

5. Updated antidote.properties for the new Module.

6. Updated action.properties for a new Edit menu and Undo and Redo submenus.

Does this sound useful?

Later, David

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to