|
Re: How to add undo/redo to my action from a context menu [message #206924 is a reply to message #206797] |
Mon, 09 January 2006 09:38 |
Eclipse User |
|
|
|
Originally posted by: ingo.koch[nospam].sap.com
Hi Danny,
do not mix up actions and commands.
Undo and redo is implemented in a command (extending AbstractCommand).
Commands can be triggered in your action (extending SelectionAction) by
calling execute(myCommand);
Perhaps you are talking of the undo/redo action: add them to your context
menu with:
IAction action;
action = getActionRegistry().getAction(ActionFactory.UNDO.getId());
manager.appendToGroup(GEFActionConstants.GROUP_UNDO, action);
action = getActionRegistry().getAction(ActionFactory.REDO.getId());
manager.appendToGroup(GEFActionConstants.GROUP_UNDO, action);
hth, Ingo
"Danny Nguyen" <ngocdannytn@sbcglobal.net> wrote in message
news:dpm783$2f5$1@utils.eclipse.org...
> Hi everyone.
>
> Please show me how I can add undo/redo function to my actions which are
> executed from a context menu.
>
> Thanks.
> Dan
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03217 seconds