This article shows how to create a simple Eclipse plug-in that can be used in Lotus Notes 8, as a component within a composite application.
Prerequisites
Install Lotus Notes 8 and the Eclipse IDE together with the Expeditor toolkit as explained in this topic (or make sure that your Eclipse environment meets the requirements as mentioned in that article).
Now we will dive straight into creating a first plug-in. This will be a quite simple plug-in to demonstrate the basic process. Creating these plug-ins is actually quite easy, if a little daunting at first.
Creating a project.
1. With Eclipse open and configured (as above) select File -> New -> Other.
2. From this dialog select Plug-In Development -> Plug-in project and click next.
3. Name your project "Sample Plug-in" and click next (leaving all the default options).
4. Click next again and in the next step deselect the "Create a plug-in using one of the templates" option before clicking "Finish". When asked if you want to change your perspective select "Yes".
In your package explorer you should see your new project and you should also see an overview of your plug-in with its ID, version, name etc. This is the basic infrastructure of your plug-in which we will be working with, called the plug-in manifest. It consists of a set of files (e.g. manifest.mf and plugin.xml) for which Eclipse's Plug-in Development Environment (PDE) provides dedicated editors.

Creating a view for the component
Next, we will create a view that will represent the plug-in (or our component) in the workbench UI. At the bottom of the plug-in manifest editor, there are several tabs which give access to specific editors to work with the plug-in configuration.
1. In order to create our view we need to select the "Extensions" tab. Using extensions we can extend Eclipse's functionality, and hence Lotus Notes 8.
2. Press the "Add" button.
3. From the list of extensions select "org.eclipse.ui.views" and click "Finish". You should now see your extension in the box titled "All Extensions" that was previously empty . This is the extension that will define the UI representing the plug-in. You can now give your extension an ID and a name. Just use "SampleView" for both for now.
4. Next select the plugin.xml tab and replace the content in that editor with this XML fragment:
<?xml version="1.0" encoding="UTF-8"?
<?eclipse version="3.2"?
<plugin
<extension
id="SampleView"
name="SampleView"
point="org.eclipse.ui.views"
<view
allowMultiple="true"
class="sampleplugin.views.SampleView"
id="Sample Plug-in.view1"
name="SampleView"/
</extension
</plugin
Hereby, an Eclipse view is declared for the extension of the extension point "org.eclipse.ui.views". Besides the required name and id, it will be implemented by a class "sampleplugin.views.SampleView" (see next steps) and the directive allowMultiple="true" indicates that multiple instances of that view will be allowed in the workbench UI.
Save the plug-in manifest.
5. Select the project in the package explorer view on the left, right click to open the context menu and select New -> Class.
6. Name your class "SampleView" and change the package name to "sampleplugin.views". Press "Browse..." next to the "Superclass" field and type in "ViewPart". Select the matching class (org.eclipse.ui.part.ViewPart) and click "OK", then click "Finish" to close the new class dialog.
In the package explorer you now have a class called "SampleView" in a new package called "views". The class is opened in a class editor - we now have created our Eclipse view for the component.
Creating a simple UI
Eclipse uses SWT to create UI for the plug-ins.
If necessary, open the sample view class by double clicking on it in the package explorer and replace the "createPartControl" method with the following code fragment:
public void createPartControl(Composite parent) {
parent.setLayout(new RowLayout());
Label label = new Label(parent, SWT.NONE);
label.setText("Value");
Text text = new Text(parent, SWT.BORDER);
text.setText("Insert Value");
Button button = new Button(parent, SWT.PUSH);
button.setText("Push Me");
}
If Eclipse reports compile errors for the changed method, then select "Source" -> "Organize Imports" and accept the default selections in any dialog. Thus, the required classes will be imported into the SampleView class. After saving the SampleView file, the errors should be resolved.
Your plugin will consist only of a label, a text field and a button and might look similar to this:

Using the component in a composite application
You have just created a plug-in that can be used as a component in any composite application. It doesn't do anything, it simply creates a basic UI that can be used in Lotus Notes 8.
To view your plug-in in Lotus Notes 8 firstly run Notes from Eclipse. Once Notes has opened create a new Composite Application and edit it with the Composite Application Editor as described here.
In the component palette section to the right change to "My Palette". Right click the palette and select "Add Components" -> "Add Locally Installed Components". A dialog will open and you should be able to select your "SampleView" from the list. Finally you simply drag and drop the component on to your application. You will now see your component as being a part of the composite application.
This article illustrated how to create Eclipse components for Lotus Notes 8. A follow-up article, "Developing an Eclipse component for Lotus Notes 8 (part 2)
," shows how to use the property broker in order to allow communication between different components.