If you have multiple plug-ins contributing applications to the launcher, you can control the order in which they appear.
The position of each launcher item is determined by the menu path of the item. If you contribute the item through the LauncherSet extension point, set the path attribute in the appropriate element (urlLauncherItem, perspectiveLauncherItem, nativeProgramLauncherItem, or launcherItem). If you contribute the item programmatically, set the path value of the item after creating the launcher item by calling the setPath() method of com.ibm.rcp.ui.launcher.LauncherContributionItem.
The item appears in the root menu group if the path matches one of the root menu group marker or separator names.
Currently, there are four predefined groups (eight group marker or separator names) in Launcher Manager, which appear in the order shown:
com.ibm.rcp.ui.findGroup - start
com.ibm.rcp.ui.findGroup – end // section A
com.ibm.rcp.ui.bookmarksGroup - start
com.ibm.rcp.ui.bookmarksGroup – end // section B
additions – end // section C
com.ibm.rcp.ui.contributions – end // section D
If the path is omitted, the launcher item appears in the additions group of the root launcher.
Except for findGroup, which always appears, and always appears at the top of the launcher menu–, whenever there is a “find" item, you can change this order by changing the setting in \framework\rcp\plugin_customization.ini:
The default value for this setting is true. When the value is false, you must provide your own group markers and separators. To do markers and separators, perform the following steps:
- Add new group markers or separators in the personality code:
launcherManager.add(new GroupMarker("MyGroup End"));
- Specify the new group markers in the path attribute of item elements in the LauncherSet extension.
Programmatically through an instance of LauncherManager, you can add more group markers between or after the predefined group markers, or you can remove the predefined group markers and substitute your own. Launcher items appear in the order specified in LauncherManager for the group markers with which they are associated. If you contribute group markers through the LauncherSet extension point, new group markers are added after the predefined group markers.
Parent topic: Launcher