I am creating an RCP app which uses a host of third-party plugins. Some of these plugins contribute menus, menu items, and toolbar buttons that I do not wish to display. How can I determine which plugins are contributing these menus, menu items, and toolbar buttons and how can I disable them from doing so?
Asked
Active
Viewed 6,888 times
2 Answers
17
To inspect details of menu, toolbar contributions etc.
- Load the Eclipse Plug-in Spy in your RCP application by including the plug-in
org.eclipse.pde.runtime
- To inspect the current selection, press ALT-SHIFT-F1
- To inspect menus, press ALT-SHIFT-F2 and then select the menu item
Use activities to remove the UI contribution. The "active action definition identifier" value provided by ALT-SHIFT-F2 is the one to use as the pattern in the activityPatternBinding specification. See this question for more info on removing unwanted UI contributions.
Note that when using activities to remove unwanted UI contributions, sometimes you will need to specify the UI contributions' plug-in id and sometimes you won't depending on the individual contribution.
NB: The Plug-in Registry view can be also used to find the IDs for contributions, although you'll have to do some searching.
-
1And this question: http://stackoverflow.com/questions/4747839/how-remove-pop-up-menu-contributions-in-eclipse-rcp – Paul Webster Jun 02 '11 at 13:16
-
The `locationURI` provided by Plug-in Menu Spy does not work for me when I use it as a `locationURI` when adding one of my own plug-in context menus. Am I missing something, or is this a limitation of Menu Spy? – StockB Feb 13 '13 at 17:05
-
It seems the plugin spy only gives the locationURI which is usually just ...?after=additions. It doesn't give the id of the menu contribution – John Tang Boyland Aug 16 '13 at 12:52