Samstag, 28. November 2009

Lotus Expeditor: Using custom launch items

When working with Lotus Expeditor and you want to add a custom launcher item to the "new" section in let's say Lotus Symphony for example, there is not much help available out there.



Sure, there is the description of different launchers in the Information center, but it only explains how to use urlLaunchItem, nativeProgramLaunchItem and perspectiveLaunchItem in detail.

So this article is for you out there searching Google for a how-to.

First define the Launcher in your plugin.xml:


(sorry Blogger didn't let me input XML here...)

Now this registers a new item (launchItem) and defines a launch item type (launchItemType) which gets invoked when clicking on it (see type attribute of launchItem and name atttribute of launchItemType).
The launchItemType invokes a class (see class attribute of launchItemType) which needs to be a subclass of com.ibm.rcp.ui.launcher.LauncherContributionItem (attention: com.ibm.rcp.jface.launcher.LauncherContributionItem is deprecated and should not be used).

The referenced class in launchItemType itself should look like this:

package com.xyz;

public class MyLaunchItemTypeClass extends com.ibm.rcp.ui.launcher.LauncherContributionItem {
@Override
public void launch(int arg0) {
super.launch(arg0);
System.out.println("LAUNCHED!");
}
}

also don't forget to put com.ibm.rcp.swtex and com.ibm.rcp.ui on your required bundles list in MANIFEST.MF.

1 Kommentar:

  1. By Far the Easiest help for Custom Launch Items, it was so much easier than the documentation.

    Have you thought about adding it to the Expeditor Wiki?

    Paul Bastide

    AntwortenLöschen