ShowTable of Contents
Introduction
One of the greatest benefits of moving Lotus Domino Designer to the Eclipse platform is better extensibility. Domino Designer defines quite a few extension points that let users create their own custom plug-ins to extend key areas. Although some plug-ins can be found on OpenNTF.org, Domino Designer also leverages Eclipse components like JFace Text Editor and the Eclipse preferences framework.
This document focuses on how to use the rich set of extension points defined by the Eclipse components. We begin by explaining how to set up the development environment and, more specifically, how to use the Lotus Expeditor Toolkit to easily deploy and debug your custom plug-ins.
We then discuss the major Eclipse components and their extension points, followed by a demonstration of how to build a plug-in that extends the new LotusScript Editor, using a real example, that is, a menu that display the list of string literals present in a script library.
Setting up the development environment
To develop extensions for Domino Designer you must install IBM Lotus Expeditor Toolkit. This toolkit provides a framework for developing, debugging, and launching IBM Lotus Notes® and Domino Designer. To extend Designer, users can create plug-in projects based on the Eclipse plug-in wizards or the Expeditor Client Services plug-in wizard.
The following explains how to install and configure the target and launch information. The toolkit uses the configuration information to set up the Java build path and the runtime for your project. Further information regarding the Expeditor Toolkit can be found on the
No-charge products, tools, and toolkits page.
Prerequisites
For Lotus Expeditor Toolkit to function property, you must first install Eclipse 3.2.1 or later. Unlike most other Integrated Development Environments (IDEs), you don't need to run a separate installer for Eclipse; just unzip it to the desired directory and launch the
eclipse.exe file.
Then create a user account with IBM and download
Lotus Expeditor Toolkit V6.2.1.
After downloading, unzip the file into a directory, for example, C:\expeditor\. Then go to the directory where you unzipped Eclipse and launch it from
eclipse.exe.
Once it has launched, select Help > Software Updates. The Software Updates and Add-ons window should appear (see figure 1).
Figure 1. Software Updates and Add-ons window
Installation
The installation steps are as follows:
1. You need to install Lotus Expeditor Toolkit as an update site, so click the Add Site button. The Add Site window displays (see figure 2).
2. Click the Local button and browse to where you unzipped the Lotus Expeditor Toolkit; click OK.
Figure 2. Add Site window
3. Select the Available Software tab and then select Lotus Expeditor Toolkit, as well as any addition packages you may need, and click
Figure 3. Available Software tab
4. Review and confirm that the checked features are the features you want to install; click Next. If you approve the license agreement, click Accept and then Finish.
5. Verify that the Add-ons were installed properly by selecting Help > Software Updates. Click the Installed Software tab and verify that Lotus Expeditor Toolkit is listed (see figure 4).
Figure 4. List of installed software
6. Restart Eclipse. The window in figure 5 displays, in which you can configure the test environment, as follows:
a. Select Lotus Notes 8 from the Test Environment drop-down menu.
b. For the Target Location field, browse to the …\framework\rcp\eclipse directory of your Lotus Notes installation; usually, it's
C:\Program Files\IBM\Lotus\Notes\framework\rcp\eclipse
c. The VM Name field is automatically set to the Notes VM. Click OK.
Figure 5. Test Environment Configuration window
6. The next step is to set up the launcher to launch with your target. The launcher is populated with all the options you need to launch your configured platform. To configure your launcher, select Run > Run Configuration, or Run > Debug Configuration.
7. Select the Client Services launcher and then Create New. Populated the launcher with the information as shown in the Debug Configurations window (see figure 6).
Figure 6. Debug Configurations window
Core Eclipse components extension points
Eclipse core components come with a rich set of extension points that are readily available to extend Domino Designer, the list of which is probably too long to describe in this document. Rather, in this section we focus on a set of key, defined extension points and show how to use the Eclipse IDE to easily find a new one.
If you want to extend the Eclipse user interface, you will most likely use one of the extension points defined in
org.eclipse.ui. Take the time to open the “Plug-in development” perspective and use the Plug-ins view to explore all the extension points provided in
org.eclipse.ui (see figure 7).
Figure 7. Extension points
The
plugin.xml editor is quite useful to access the extension point description or to quickly find other plug-ins that are using the selected extension points and can be used as examples.
If the extension point author has supplied a schema (.exsd), the “Show extension point description” link will display a nicely formatted page that can be used as documentation and as an example to write your own implementation.
For instance, figure 8 shows the description page for the
org.eclipse.ui.editor extension point.
Figure 8. Description page
Here are a few of the most important extension points:
•tab
editors. Adds new editors to the Eclipse Workbench. Editors can be associated with a file using extensions and/or specific file names.
•tab
•tab
views. Adds new views to the Eclipse Workbench. A view is the visual component that is contained within a perspective.
•tab
•tab
perspectives. Adds new perspectives to the Eclipse Workbench. A perspective defines the views and layout that the user needs to accomplish a set of tasks. Perspectives in Eclipse are customizable.
•tab
•tab
PreferencePages. Adds pages to the standard Eclipse preference dialog box.
•tab
•tab
actionSets. Adds top-level menus, contextual menus, and toolbar items to the Eclipse Workbench.
In addition, it's worth noting the extension points defined by the
org.eclipse.core.resources plug-in:
•tab
builders. Adds builders to the Eclipse Workbench. Builders are agents invoked to process a set of resources changes.
•tab
•tab
markers. Creates markers, which are pieces of information associated with a resource. Markers can be persisted on disk or not. Examples of markers are problem markers, bookmarks, etc.
•tab
natures. Creates project natures, which define life-cycle behaviors for a project. For example, a nature is responsible for associating one or more builders to a project.
Tutorial: Building a plugin for the new LotusScript editor
Create a new plugin project
Create a new extension point of type org.eclipse.ui.editorActions
Implement and test the action
Deploy
Source code attachment
Conclusion
Resources
About the authors