How to add/bind standard menus in an Application? [message #293551] |
Wed, 26 October 2005 07:33  |
Eclipse User |
|
|
|
Hi,
I have an application in which I add:
ActionFactory.SAVE.create(window)
to the application File menu.
It has the correct shortcut but it does not work. What else do I need to
setup/register in order for the binding to link to the save action?
Thanks in advance.
Regards,
Tim.
|
|
|
|
Re: How to add/bind standard menus in an Application? [message #293554 is a reply to message #293553] |
Wed, 26 October 2005 08:01  |
Eclipse User |
|
|
|
Hi,
Thanks for the reply. I managed to solve it just after I posted the email :)
I was just about to post that I had found the fix when I saw your email.
The ActionBarAdvisor has a register method that you need to call as you fill
in the file menu etc.. passing in the actions.
Regards,
Tim.
"Mathieu Watel" <mathieu.watel@axlog.fr> wrote in message
news:596de40010e38b4be1e4b2bf6027ec6e$1@www.eclipse.org...
> If you are in a view, you can do this :
>
> getViewSite().getActionBars().setGlobalActionHandler(actionI d, action);
>
> More generally, you have to call the setGlobalActionHandler method on the
> action bar you need to bind.
>
> Check the updateActionBars method too, you will need it.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03189 seconds