All,

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 =
                getContext().getSelectionManager().getSelectedElements();

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

        getContext().getACSElementClipboard().copyToClipboard(element);

        getContext().getEventBus().postEvent(
            new CopyElementEvent(getContext()));
    }


And like David's undo/redo there are modification in the antidote.properties 
and action.properties.

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

Craig


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

Reply via email to