« Developing a simple plug-in for Lotus Notes. Part 1 | Main| This one's gotta work or I'm shooting myself. »

Developing a simple plug-in for Lotus Notes. Part 2

Category   
Bookmark : del.icio.us  Technorati  Digg This  Add To Furl  Add To YahooMyWeb  Add To Reddit  Add To NewsVine 


This is part 2 of a three part tutorial.
Part 1
Part 3

5. Testing the plug-in

 
Click on the Run button tutorial1-32.jpg or select Run -> Run... from the main menu.
In the Run dialog select Client Services and click on the New tutorial1-34.jpg icon.      
Expeditor will do most of the work to setup the new run configuration. All we need to do is name it Notes 8 instead of the default New_configuration and click on the Run button.
tutorial1-67.jpg
Note. Only one instance of Notes 8 can be open at once. If you already have your 'real' copy of Notes 8 open the development instance will fail to launch with the following error.
tutorial1-36.jpg
Once Notes 8 is open our new plug-in will show in the Sidebar. If it doesn't, select View -> Sidebar Panels -> Sample View from the main menu.
tutorial1-37.jpg


We have now written our first Lotus Notes 8 plug-in.

6. Customising the plug-in

 

Now it's time to make a few changes to the plug-in. We are not going to write any code but we will change the views icon and name.

Close the development instance of Notes 8 and return to Eclipse.
Double-click on plugin.xml file in the Project Navigator.
Select the Extensions tab and expand the org.eclipse.ui.views extension and select the Sample View (view) entry.
Change the value of the name field from Sample View to Tutorial 1.
Change the value of the icon field from icons/sample.gif to icons/tutorial1.gif. Note: Images names are case sensitive.
Save and close plugin.xml.
tutorial1-38.jpg
Download this icon tutorial1.gif, save it as tutorial1.gif and paste it into the icons folder of the plug-in.
Click on the Run button tutorial1-32.jpg to test the plug-in in Notes.    
Here's how the plug-in looks now. Note the new icon and title.
tutorial1-40.jpg


Our plug-in masterpiece is finished. In the next section we will see how to package it so that it can be installed in the Notes 8 client.

7. Creating a Feature Project


This section will explain how to package our plug-in so that it can be installed into the Notes 8 client. We will create a feature plug-in, an update site and an update site database.

Earlier on in the tutorial we installed the Lotus Expeditor toolkit and I said that we were installing loads of plug-ins. That's only partly true. In Eclipse we never actually install plug-ins, we install Features. So, before anyone can install our plug-in we need to create a feature which will hold the plug-in.
To create a new feature project select File -> New -> Other... from the main menu.
Expand the Plug-in Development section, select Feature Project and click Next.
tutorial1-41.jpg
On the Feature Properties page enter the name of the project. Give it the same name as the plug-in with .feature on the end and then click Next.
tutorial1-42.jpg
On the References Plug-ins page select the com.domiclipse.tutorial1 plug-in and click Finish.
tutorial1-43.jpg
The new feature project can now be seen in the Project Navigator view and feature.xml is open for editing.
Select the Overview tab and change the Name of the feature from the default Feature Feature to Tutorial1 Feature.
tutorial1-46.jpg
Select the Information tab and enter the description, copyright and license of the feature.
tutorial1-45.jpg
Select the Plug-ins tab. This tab shows which plug-in are included in the feature.
tutorial1-48.jpg
Save and close feature.xml.
The feature is now ready to be deployed to an Update Site.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)