To contribute items to the launcher dynamically, you can implement the following extension points:
- launcherSet -- Contributes items to the extension point registry when the client starts and displays all items in the launcher drop-down list.
- bookmarkProvider -- Contributes items to the launcher drop-down list lazily. The bookmarked items are not loaded in memory until a user accesses the folder containing the items from the launcher drop-down list. The list of bookmarks is updated when items are added or removed or when the bookmark provider sends notification of some other change.
You can also contribute items to the launcher programmatically. The client provides the following classes that are derived from the LauncherContributionItem
- NativeProgramLauncherContributionItem – Creates a link in the launcher to a native application.
- PerspectiveLauncherContributionItem – Creates a link in the launcher to a standard client application.
- UrlLauncherContributionItem – Creates a link in the launcher to a specified URL.
You can also create a custom implementation of a LauncherContributionItem-derived
If you are using WebSphere® Portal to create a Portal-based application that you are pushing to the client through the Composite Application Infrastructure, you can add the page to the launcher by specifying the following page parameter: com.ibm.rcp.launcher=true
To populate the launcher, complete the following steps:
- Use or extend the default personality or create your own personality which has a workbench window advisor that initializes the LauncherManager class located in the com.ibm.rcp.ui plug-in, and the LauncherRegistry class located in the com.ibm.rcp.ui plug-in.
- Do one of the following:
- Implement the launcherSet extension point, and in it, define the type of contribution you are providing. This method allows you to make a contribution without activating the contributing plug-in. The compiled code of the plug-in is not loaded into memory, which helps the program to start quickly and requires fewer system resources. You can use one of the following elements to implement a corresponding class, which are predefined LauncherContributionItem-derived classes provided in the com.ibm.rcp.ui plug-in
- nativeProgramLaunchItem -- Identifies the item as being a NativeProgramLauncherContributionItem class, which is a contribution item that starts a native program.
- perspectiveLaunchItem -- Identifies the item as being a PerspectiveLauncherContributionItem class, which is a contribution item that starts a standard client application by specifying an Eclipse perspective.
- urlLaunchItem -- Identifies the item as being a UrlLauncherContributionItem class, which is a contribution item that opens a URL.
- Directly instantiate a LauncherContributionItem-derived class, or create a custom one and add it directly to the LauncherManager. If you use this method, your plug-in must declare a dependency on the com.ibm.rcp.ui plug-in.
Parent topic: Launcher: XPD622