Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: for the plan.

Jump to: navigation, search

FAQ How do I add menus to the main menu?

Revision as of 16:26, 14 March 2006 by Claffra (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Menus and submenus are added to the main menu by using the org.eclipse.ui.actionSets extension point. Here is an example of a top-level menu defined by the FAQ Examples plug-in:

      label="FA&Q Examples"
      <separator name="exampleGroup"/>

Each menu contains one or more separator elements that define groups within that menu. The menu ID, along with the separator name, is used by actions contributing to that menu. If you want to create a submenu, you also need to define a path attribute that specifies what menu and group your menu should appear under. This path attribute has the same syntax as the menubarPath attribute on action definitions. To add a submenu to the menu defined earlier, you would add the following attribute:


To add a submenu to the File menu after the New submenu, the path would be:


The syntax of menu paths is described in more detail in FAQ 223.

See Also:




This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.

Back to the top