Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » org.eclipse.ui.menus own contributions
org.eclipse.ui.menus own contributions [message #497029] Thu, 12 November 2009 10:19 Go to next message
Michael Szediwy is currently offline Michael SzediwyFriend
Messages: 23
Registered: July 2009
Junior Member
Hi,

I want to define a menu using the org.eclipse.ui.menus extension point
(e.g. <menuContribution locationUri="toolbar:my.id">[...]). How would I
read out the according contribution manager for the id "my.id"
programmatically?

Thanks in advance.

Cheers

Michael
Re: org.eclipse.ui.menus own contributions [message #497981 is a reply to message #497029] Fri, 13 November 2009 15:37 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

ToolBarManager myManager = ...;
IMenuService ms = (IMenuService) getSite().getService(IMenuService.class);

and then use

org.eclipse.ui.menus.IMenuService.populateContributionManage r(ContributionManager, String)

With toolbar:my.id

Don't forget to release the contribution manager when done with it.

PW


Previous Topic:Help Preferences
Next Topic:class file(s) on classpath not found or not accessible
Goto Forum:
  


Current Time: Tue Mar 19 04:48:28 GMT 2024

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

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

Back to the top