Package org.eclipse.ui.menus
Class MenuUtil
java.lang.Object
org.eclipse.ui.menus.MenuUtil
Provides utilities and constants for use with the new menus API.
- Since:
- 3.3
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final String-Any- Popup Menustatic final StringMain Menustatic final StringMain ToolBar (CoolBar)static final StringValid query attribute.static final StringValid query attribute.static final StringValid query attribute.static final StringContributions of targets to this location will be included with the show in menu.static final StringTop Left Trim Areastatic final StringTop Right Trim Areastatic final StringBottom (Status) Trim Areastatic final StringLeft Vertical Trim Areastatic final StringRight Vertical Trim Areastatic final StringWorkbench Menu.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringmenuAddition(String id) Convenience method to create a standard menu addition The resulting string has the format: "menu:[id]?static StringmenuAddition(String id, String location, String refId) static Stringstatic StringConvenience method to create a standard toolbar addition The resulting string has the format: "toolbar:[id]?static StringtoolbarAddition(String id, String location, String refId) static StringtoolbarUri(String id) 
- 
Field Details- 
WORKBENCH_MENUWorkbench Menu. On supported platforms, this menu is shown when no workbench windows are active- Since:
- 3.7
- See Also:
 
- 
MAIN_MENUMain Menu- See Also:
 
- 
MAIN_TOOLBARMain ToolBar (CoolBar)- See Also:
 
- 
ANY_POPUP-Any- Popup Menu- See Also:
 
- 
TRIM_COMMAND1Top Left Trim Area- See Also:
 
- 
TRIM_COMMAND2Top Right Trim Area- See Also:
 
- 
TRIM_VERTICAL1Left Vertical Trim Area- See Also:
 
- 
TRIM_VERTICAL2Right Vertical Trim Area- See Also:
 
- 
TRIM_STATUSBottom (Status) Trim Area- See Also:
 
- 
QUERY_BEFOREValid query attribute. Usage menu:menu.id?before=contribution.id.- Since:
- 3.6
- See Also:
 
- 
QUERY_AFTERValid query attribute. Usage menu:menu.id?after=contribution.id.- Since:
- 3.6
- See Also:
 
- 
QUERY_ENDOFValid query attribute. Usage menu:menu.id?endof=contribution.id.This menu contribution will be placed at the end of the group defined by contribution.id (usually right in front of the next group marker or separator). Further contribution processing can still place other contributions after this one. - Since:
- 3.6
- See Also:
 
- 
SHOW_IN_MENU_IDContributions of targets to this location will be included with the show in menu.- Since:
- 3.4
- See Also:
 
 
- 
- 
Constructor Details- 
MenuUtilpublic MenuUtil()
 
- 
- 
Method Details
- 
toolbarUri- Parameters:
- id- The toolbar's id
- Returns:
- The lcoation URI for a toolbar with the given id
 
- 
toolbarAddition- Parameters:
- id- The id of the toolbar
- location- The relative location specifier
- refId- The id of the toolbar element to be relative to
- Returns:
- A location URI formatted with the given parameters
 
- 
toolbarAdditionConvenience method to create a standard toolbar addition The resulting string has the format: "toolbar:[id]?after=additions"- Parameters:
- id- The id of the root element to contribute to
- Returns:
- The formatted string