Transformation from AbstractMiniApp to ViewPart

I am certainly not the best reference to be quoted regarding this topic and I would be glad if somebody seeing any incorrectness could point that out so I can amend these details for further reference.

Whereas I did had in mind that the way in which ViewParts are going to be added had been changing from Sametime 7.5 to version 7.5.1, I did not consider the same when I installed the new version yesterday night. When I opened my Eclipse development environment this afternoon I got welcomed with two information in the source code.

The first information had been related to the Group class defined in The getNumberOnlineChildren method has been deprecated and swapped against the getOnlinePersonCount method. This was quite straightforward and easy to understand. Unfortunately is the new 7.5.1 SDK not yet available otherwise it would be interesting to see what else has changed in the background.

Much more interesting of course had been the deprecation of the AbstractMiniApp class, previously defined in the package. I did know from various sources like Jeff Eisen, Mikkel Heisterberg or the technical article “extending the IBM Lotus Notes V8 sidebar and toolbar” that I now need to go the way using the org.eclipse.ui.part.ViewPart but there was no complete instruction (for a completely newbie as me in this area) available yet.

What I had to do:

First of all I had to swap the extension point being used from to org.eclipse.ui.view. So I deleted the miniApps extension from the plugin.xml and added the org.eclipse.ui.views extension instead. From there I created a new view and linked this view to my previously used MiniApp Java class.
The next step is editing the MiniApp class. Instead of extending the AbstractMiniApp class I had to extend the ViewPart class. To use the class it does of course need to be imported from the org.eclipse.ui.part package. The ViewPart class inherits two methods, createPartControl() and setFocus(). SetFocus() does only have to exist to get the extension displayed. Later on it will be used to redirect the focus to any object being used within the extension. However, the previous extended AbstractMiniApp method createControl() has needed to be changed to call createPartControl() or the name needs to be changed to createPartControl() instead.
This creates the Eclipse view itself, however, the actual extension point responsible for displaying the view in Sametime is As far as I understand (and somebody might want to correct me) the Shelf View acts kind of a container in Sametime and Notes 8 to display Eclipse view extensions. Thus the final step to have the view shown up is to add the shelfViews Extension to the plugin.xml and set the parameter as defined by the extension point. It is important to set the view property of the shelfView to the same value as the view id of the ViewPart as shown in the example below.

ShelfView Extension Point

Leave a Reply

Your email address will not be published. Required fields are marked *