How to determine which eclipse plugins are contributing to menus and toolbars and stop them

ⅰ亾dé卋堺 提交于 2019-12-20 09:43:33

问题


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?


回答1:


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.




回答2:


Alt + Shift + F2
then click some menu.
You can know contributor and menu URI.

Alt + Shift + F1 : inspect current active part and selection.
Alt + Shift + F3 : inspector contributor of Widget or item.

You needs plugin-spy plugin in runtime.



来源:https://stackoverflow.com/questions/6209033/how-to-determine-which-eclipse-plugins-are-contributing-to-menus-and-toolbars-an

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!