Remove Eclipse’s top menus

Hi,

I have just had to hide some Eclipse menus from a perspective.
Two in fact: “Run” and “Navigate“. There were too many menus and these two were useless.
So, one possible solution to remove them could have been with capabilities.

But I used a more simple solution, based on perspective extensions.
No more talk, here is the XML sample that illustrates it (useful to get the menu IDs).

<extension
 point="org.eclipse.ui.perspectiveExtensions">
    <perspectiveExtension
     targetID="com.ebmwebsourcing.petals.common.mainPerspective">
         <hiddenMenuItem id="org.eclipse.ui.run"></hiddenMenuItem>
         <hiddenMenuItem id="navigate"></hiddenMenuItem>
     </perspectiveExtension>
 </extension>

4 thoughts on “Remove Eclipse’s top menus

  1. You are a god!!
    I was short before killing my self because I was not able to remove that damn “run” menu entry.

  2. Hi Vincent Zurczak,
    Thanks for this but I had a problem.
    I tested the code below but the run menu still available in menu bar.
    Have you any idea about what’s wrong?
    thanks

    1. Hi,
      Which version of Eclipse are you using? This snippet was tested on Eclipse 3.x (3.7 and 3.8 from memories).
      On Eclipse 4.x, menu IDs may have changed. And the mechanisms may have changed too.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s