Redo/Undo in GEF and Eclipse [message #13964] |
Thu, 18 July 2002 08:08  |
Eclipse User |
|
|
|
Hi
In my editorpart, the context menu shows und/redo to the previously
executed commands, in a similar way that is in the logic example. my
problem is that even if there is something to undo/redo, and the context
menu entries are enabled, in the eclipse menu Edit->Undo, or Edit-Redo,
are not enabled. moreover, the shrtcuts ctrl-Z and ctrl-y does not work.
what can i do to connect between my commands and this menu?
|
|
|
Re: Redo/Undo in GEF and Eclipse [message #13983 is a reply to message #13964] |
Thu, 18 July 2002 11:25  |
Eclipse User |
|
|
|
Are you using GEF's ActionBarContributor? In
ActionBarContributor.setActiveEditor(IEditorPart), the global actions (undo,
redo, and delete) are registered with the ActionBars.
for (int i=0; i<globalActions.size(); i++) {
id = (String)globalActions.get(i); // i.e.
IWorkbenchActionContants.UNDO
bars.setGlobalActionHandler(id,registry.getAction(id)); //
register this action as the global handler
}
I'm not sure why the toolbar items work without this and the menu items don't.
Eric
"Yoav Rubin" <yoav@il.ibm.com> wrote in message
news:ah6b34$kc9$1@rogue.oti.com...
> Hi
> In my editorpart, the context menu shows und/redo to the previously
> executed commands, in a similar way that is in the logic example. my
> problem is that even if there is something to undo/redo, and the context
> menu entries are enabled, in the eclipse menu Edit->Undo, or Edit-Redo,
> are not enabled. moreover, the shrtcuts ctrl-Z and ctrl-y does not work.
> what can i do to connect between my commands and this menu?
>
|
|
|
Powered by
FUDForum. Page generated in 0.04257 seconds