Breadcrumb
- Sabre Red 360 Software Development Kit Help
- Desktop Red Apps
- Workbench or UI Elements
- Basic Menus
- Identifiers and locationURI Syntax for Main Menus
Identifiers and locationURI Syntax for Main Menus
Syntax for main menu contribution identifies the specific menu and the insertion point for the menu entry. The below topics explain the syntax.
Identifiers for Main Menu Location Syntax
The following table lists the values for configuring main menu contributions.
MENU_ID and ITEM_ID Values for Main Menu Location Syntax
Location |
MENU_ID Values |
ITEM_ID Values |
'File' menu |
menu:file |
file.top – Separator com.sabre.edge.command.file.printpreview – Print Preview com.sabre.edge.command.file.print – Print file.bottom – Separator org.eclipse.ui.file.exit – Exit |
'Edit' menu |
menu:edit |
edit.top – Separator com.sabre.edge.command.edit.cut – Cut com.sabre.edge.command.edit.copy – Copy com.sabre.edge.command.edit.paste – Paste edit.selectall – Separator com.sabre.edge.command.edit.selectall – Select All edit.appsarea – Separator edit.bottom – Separator |
'View' menu |
menu:view |
view.top – Separator view.bottom – Separator |
'Tools' menu |
menu:tools |
tools.top – Separator tools.topmiddle – Separator tools.middle – Separator tools.bottom – Separator |
'Tools/Air' sub-menu |
menu:com.sabre.edge.toolbar.launcher.air |
- |
'Tools/Car & Ground' sub-menu |
menu:com.sabre.edge.toolbar.launcher.carandground |
- |
'Tools/Hotels' sub-menu |
menu:com.sabre.edge.toolbar.launcher.hotels |
- |
'Tools/Tour and Vacation Packages' sub-menu |
menu:com.sabre.edge.toolbar.launcher.tourandvacs |
- |
'Tools/Cruise' sub-menu |
menu:com.sabre.edge.toolbar.launcher.cruise |
- |
'Tools/Rail' sub-menu |
menu:com.sabre.edge.toolbar.launcher.rail |
- |
'Tools/Other' sub-menu |
menu:com.sabre.edge.toolbar.launcher.other |
- |
'Tools/Community' sub-menu |
menu:com.sabre.edge.toolbar.launcher.agency |
- |
'Windows' menu |
menu:windows |
window.top – Separator window.bottom – Separator |
'Help' menu |
menu:help |
help.top – Separator help.bottom – Separator help.about.bottom – Separator com.sabre.edge.command.help.about – About |
locationURI Syntax for Main Menus
Red Apps apply specific syntax for main menu contributions. You are required to add the syntax to the org.eclipse.ui.menus extension point in the locationURI
property for menuContribution
.
The syntax identifies the menu that will receive your menu contribution. By default, a new menu contribution is inserted at the last position of the sub-menu. You can, however, specify the placement in relation to other menu entries with the optional PLACEMENT
variable. The below paragraphs explain the syntax.
Syntax for Default Location of the Insertion Point
locationURI=MENU_ID
Where:
MENU_ID
is any of the values in the MENU_ID column in the preceding table.
Example
The below example places the insertion point for the menu contribution in the last position on the Tools menu.
locationURI=menu:tools
Syntax for Customizing the Placement of the Insertion Point
locationURI=menu:MENU_ID?PLACEMENT=ITEM_ID
Where:
MENU_ID is any of the values in the MENU_ID column in the preceding table.
The ?
character follows MENU_ID.
PLACEMENT is either BEFORE or AFTER. PLACEMENT is required for customization.
ITEM_ID is any of the values that correspond to the MENU_ID in the ITEM_ID column in the preceding table. ITEM_ID is used in combination with PLACEMENT.
Examples
The below example places the insertion point for the menu contribution after the Print Preview entry on the File menu.
locationURI=menu:file?after=com.sabre.edge.command.file.printpreview
The following example places the insertion point for the menu contribution before the top separator on the Edit menu.