ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Le Comte" <david_c_leco...@hotmail.com>
Subject [Antidote] Undo/Redo
Date Wed, 04 Dec 2002 10:08:54 GMT
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:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message