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 Szediwy
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 Webster
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 Sep 30 15:54:11 GMT 2014

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

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