ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Campbell" <>
Subject [Antidote] Cut/Copy/Paste
Date Wed, 04 Dec 2002 17:26:01 GMT

While we are in the middle of adding things to the edit menu, I would like to suggest something
that I have found extermely helpful.

I have created cut/copy/paste commands that work on the Navigation tree.
The modules consist of:

-CopyElementCmd, CutElementCmd, PasteElementCmd, with corresponding Events.
-Clipboard that takes ACSElements in a copyToClipboard(ACSElement element) method.

I modified the AppContext to hold an instance of the Clipboard which makes it accessible to
any command.

Here is the code from CopyElementCmd

  public void run() {
        ACSElement[] elements =

        ACSElement element =
                (ACSElement)elements[elements.length - 1].cloneNode(true);


            new CopyElementEvent(getContext()));

And like David's undo/redo there are modification in the and

If this is something we want to implement, it is independent of the other projects we are
working on.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message