Eclipse provides "capabilities" as a functionality for the plugin developpers to provide a way to the users to disable the features and UI contributions of their plugins. I don't really know if that feature will help in your case (that is : if the plugins contributing the menu entries that bother you have defined the necessary capability to disable them).
If you go to Window > Preferences
, then General > Capabilities
, you can see a number of "capabilities" categories to enable or disable. I don't recommend disabling the categories themselves (for example "development") as you would disable all of Ant, Java, Python... menus and extension at once. Rather, use the "Advanced..." menu at the bottom of this page to see not only the categories, but also what they contain. There, under "Development", you should be able to disable "java development" (JDT) extensions and menus, "Ant Development" (remember that "Run Ant Tool" button that is visible on all perspectives beside the "Run" button? That would remove it)... You should be able to disable most of the clutter with this.
Note that if the provided capabilities are not sufficient, you can create your own very easily, allowing you to disable even the contributions from other plugins. For this the steps are simple :
- Use the
File > New > Other...
menu item
- Select Plug-in Project and name the new project as you desire, click Finish
- In the editor that has opened, select the "Extensions" tab
- Click Add, untick "Show only extensions points from the required plug-ins"
- search for the extension point
org.eclipse.ui.activities
, select it, and hit Finish
- Right click the item
org.eclipse.ui.activities
on the left and select New > Activity
- enter the id of your new activity on the right of the page, for example
my.disable.activity.id
. Enter a human-readable name below it; for example "disable JDT".
- Right click the item
org.eclipse.ui.activities
on the left and select New > activityPatternBinding
.
- re-enter your activity Id (
my.disable.activity.id
) in the "activityId" field, then enter the "pattern" of the contributions you wish to disable. This is a regex. In order to disable all "JDT" (java development) contributions, enter org\.eclipse\.jdt\..*
- Right click the item
org.eclipse.ui.activities
on the left and select New > categoryActivityBinding
- re-enter your activity Id (
my.disable.activity.id
) in the "activityId" field once again; then click Browse... at the right of the "categoryId" field. Double click the org.eclipse.categories.developmentCategory
so that it appears in the preference menu for capability enablement.
Now, if you export this plugin (I won't detail the update site creation here, you should be able to adapt the explanation from Stephane Begaudeau's blog), all menus from the JDT will be disabled (I tested this, so I know it at least disables those I checked (the "source" and "refactor" menus from a right-click on a Java file). As you specified a category, you can re-enable these menu items from the capabilities preference page I hinted at in the beginning of this answer.