Properly updating your Features and Plug-ins Widgets

My Widgets is a very powerful and easy method for deploying Eclipse features and plug-ins to the Lotus Notes 8.5.1 clients and above.  If not careful,  it can however bite you.  So here is my story…

I had some strange behaviors when I was sending out the attachment viewer in the beginning so I figured I would share those experiences.

When you create a Features and Plug-ins widget using the “Getting Started with Widgets…” icon in the Notes client you basically point it at an Eclipse update site on some HTTP server and select which features you want to install.  The wizard generates the extension.xml you see below.

The problem I had was; when I changed the update site (compiled new features and plug-ins) the versions for the features and plug-ins were updated (remember the .qualifier post?) and no longer matched the versions specified in the widget.  So I generated a new widget using the wizard based on the newly compiled feature versions in the Eclipse update site.  This would be fine if I wanted whole new features to be installed but in the end I only wanted one widget.  So what did I have to do?

Well, I had to save the extension.xml locally and edit it.  The reason is, I needed to retain the widget Id (in red below) so the Notes client would prompt me to update the existing widget – versus installing a new one.  You can see the widgets extension.xml below.  I would then change the feature version (install and requirement versions), also in red below to the new versions.  You then post this in the catalog or send back out to your users via email to have the new Eclipse features install and the existing widget “upgraded”.  I actually ended up storing the extension.xml in source control with the update site so the Id will always be retained.

<?xml version="1.0" encoding="UTF-8"?>
<webcontextConfiguration version="1.1">
<palleteItem contributeToSideshelfOnStartup="false"
             doubleClickCommandId=""
             hideThumbnail="false"     i
             id="1399769204" 
             imageUrl="https://blog.balfes.net/sites/atviewer-pub/at-icon.png"
             providerId="com.ibm.rcp.toolbox.prov.provider.ToolboxProvisioning"
             singletonSidebar="false" title="Attachment Viewer Feature"
             url="https://blog.balfes.net/sites/atviewer-pub"
     viewImageUrl="">
<data>
<installManifest>
   <![CDATA[<install>
     <installfeature version="1.0.0.201010051341">
         <requirements>
             <feature version="1.0.0.201010051341" match="compatible" />
         </requirements>
     </installfeature>
</install>
]]></installManifest>
</data>
</palleteItem>
</webcontextConfiguration>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s