Skip to main content


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 12:17 Go to next message
Grzegorz Abramczyk is currently offline Grzegorz AbramczykFriend
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 13:46 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
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: Thu Apr 25 05:07:25 GMT 2024

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

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

Back to the top