Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to add/bind standard menus in an Application?
How to add/bind standard menus in an Application? [message #293551] Wed, 26 October 2005 07:33 Go to next message
Eclipse UserFriend
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 #293553 is a reply to message #293551] Wed, 26 October 2005 07:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mathieu.watel.axlog.fr

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.
Re: How to add/bind standard menus in an Application? [message #293554 is a reply to message #293553] Wed, 26 October 2005 08:01 Go to previous message
Eclipse UserFriend
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.
>
Previous Topic:Classloading problems
Next Topic:View Toolbar: How to set an action as "toggle Button"
Goto Forum:
  


Current Time: Sun Jul 27 18:07:53 EDT 2025

Powered by FUDForum. Page generated in 0.03189 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top