Used to add menus, menu items, and toolbar buttons. Contains menu and action elements.
If the label of the menu element is Chinese, add the shortcut to "file (& F)" as the inner character shortcut; path is the position added to the menu (insert the menu position from the root directory, if omitted, the menu is added to the additions naming group by default;
The action element is equivalent to a menu item, and the label is the name of the menu item "(New (& n)". menupath specifies the position of the operation in the menu bar and uses '/' to define the path, for example, help/helpend. Add action at the end of the Help menu. If this option is omitted, this operation will not appear in the menu bar. Toolbarpath specifies the location of this operation in the toolbar, and uses '/' to define the path. The first mark indicates the toolbar identifier (normal indicates the default toolbar ), the second is the name Group marked in the toolbar. If there is no reorganization, it will be created. If this option is omitted, the action will not appear in the toolbar. Style control menu styles include Radio (with vertices), toggle (with hooks), and push (normal) pulldown. The initial state is specified by the State option.
1. Create a menu item for an independent menu:
<Menu
Path = "additions">
Id = "menu1"
<Separator
Name = "separator1">
</Separator>
<Separator
Name = "separator2">
</Separator>
</Menu>
<Action
Label = "New (& amp; n )"
Menubarpath = "menu1/seperator1"
Toolbarpath = "Save. Group"
</Action>
2. Create a secondary menu for an independent menu
<Menu
Path = "additions">
Id = "menu1"
<Separator
Name = "separator1">
</Separator>
<Separator
Name = "separator2">
</Separator>
</Menu>
<Menu
Path = "menu1/additions">
Id = "menu2"
<Separator
Name = "separator1">
</Separator>
<Separator
Name = "separator2">
</Separator>
</Menu>
<Action
Label = "New (& amp; n )"
Menubarpath = "menu1/menu2/seperator1"
Toolbarpath = "Save. Group"
</Action>
3. Create a menu item and a level-2 menu item for the existing workbench menu, just set the path to the existing menu. The menu insertion points provided by the standard workbench include file, edit, navigate, project, window, and help. Each menu item in each menu is an insert point. Taking the File menu as an example, the insert points include: filestart, new, close, closeall, save, and so on.
4 The position on the toolbar is determined by the toolbar identifier (Org. eclipse. UI. workbench. file, org. eclipse. UI. workbench. navigate, org. eclipse. UI. workbench. launchactionset/normal) and toolbar Group Identifier (New. group, save. group, pin. group, such as Org. eclipse. UI. workbench. file/New. group adds a tool before the new button. The most common setting is normal/additions.