Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to get rid of unwanted menu contributions registered against MenuUtil.ANY_POPUP
How to get rid of unwanted menu contributions registered against MenuUtil.ANY_POPUP [message #844838] Sat, 14 April 2012 08:17 Go to next message
Grzegorz Abramczyk is currently offline Grzegorz Abramczyk
Messages: 10
Registered: April 2011
Junior Member
I'm trying to use "org.eclipse.ui.menus" to populate my popup menu for viewer in my editor. I have registered menuContribution against "popup:my-id" and I have registered context menu with that id:
getSite().registerContextMenu("my-id", menuManager, treeViewer);

My contributions are showing up but unfortunately I've got many other menu items like "Run As", "Debug", "Validate", ... which do not make any sense in context of my menu. Is there any elegant way to get rid of them?

Inelegant way would be to extend internal class PopupMenuExtender and reimplement addMenuContributions without adding contributions registered against MenuUtil.ANY_POPUP.
Re: How to get rid of unwanted menu contributions registered against MenuUtil.ANY_POPUP [message #855063 is a reply to message #844838] Tue, 24 April 2012 09:46 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

What kind of elements is your treeViewer content?

PW


Previous Topic:Insert command toolbar button to action set
Next Topic:Proposal for refresh behavior in Project Explorer
Goto Forum:
  


Current Time: Sat Aug 23 09:36:01 EDT 2014

Powered by FUDForum. Page generated in 0.01980 seconds