New functionality was added in Notes 8.5.1 to make MyWidgets more dynamic

In Lotus Notes 8.5.1 a small, but very useful, addition was made made to the MyWidgets funtionality. From Notes 8.5.1 the preferences that you specify for your widgets may be computed by the platform instead of being mapped to something you specify via LiveText or text selection. Below is a small snippet from an extension.ml file showing how a value is normally mapped to a parameter (in this case “Mikkel Flindt Heisterberg” is mapped to the “name” parameter).

<preference name="name">
<value>Mikkel Flindt Heisterberg</value>
<displayName>name</displayName>
<enumValues/>
<enumDisplayValues/>
<datatype></datatype>
<isEnum>false</isEnum>
<isRequired>true</isRequired>
<isHidden>false</isHidden>
</preference>

So what if you want to use the current username or the current date? Well up to now you were at a loss or you had to incorporate the functionality into the service you linked to. But since this isn’t always possible IBM added the option of specifying it in the widget itself.

The way to do it is by using a “name” or “date” command in place of the static text (“Mikkel Flindt Heisterberg” in the example above). The syntax is as follows:

${command:parameter}

The following two commands are available:

  • name
  • date

As you might be to format the date or specify the part of the username you need (common name, organization etc.) you use “parameter” part to further instruct the command. Below is some documentation on each of the commands.

  • ${name:nameType}
    For example: ${name:cn}/${name:ou}/${name:o} will resolve to “CommonName/OrganizationlUnit/Organization.” For example: ${name:dn} will resolve to the user’s full distinguished name.
  • ${date:dateformat}
    For example: ${date:yyyy MM DD} will resolve to the current date (in this example “2009 03 20”). The “dateFormat” should be a valid Java date format string.

Using the “name” command the above XML snippet becomes:

<preference name="name">
<value>${name:cn}</value>
<displayName>name</displayName>
<enumValues/>
<enumDisplayValues/>
<datatype></datatype>
<isEnum>false</isEnum>
<isRequired>true</isRequired>
<isHidden>false</isHidden>
</preference>

Information is available in the infocenter (Using a widget property to filter a current user name or date)

Properly signed XTAF dictionaries now available for Notes 8.5.x

The wait has been long but I just got word (via Christian Henseler) that IBM yesterday released properly signed XTAF dictionaries for Notes 8.5.1. In case you’re wondering “XTAF dictionaries” are the common dictionaries shared by Lotus Notes, Lotus Sametime and Lotus Symphony. Additional language dictionaries has been available for a while but the Eclipse feature wasn’t signed so it was troublesome to install on client machines. The Eclipse features are now properly signed and they are easy to add to an update site and roll out using a widget catalog.

The bundle you need to grab from PartnerWorld or Passport Advantage is “IBM Lotus Notes XTAF Dictionaries 8.5.1 for Windows and Linux Multilingual (CZHE3ML)”.

Java class line numbers for plugin developers

If you’ve been tasked with developing and/or debugging Java extensions for the Notes 8 client you know that line numbers has been missing from the stacktraces produced by Notes. This can be a real problem when trying to debug stuff in a production client. There has been some discussion among the ones of us developing these extensions on how to enable these line numbers. The other day this information was provided by Srinivas Rao of IBM and I wanted to publish it here for all to read.

Line numbers are removed from the classes added to the shared class cache to reduce the memory needed for the memory mapped classes. To re-enable the line numbers, one needs to edit the <notes>frameworkrcpdeployjvm.properties file and add comment out the ignorelinenumbers vm argument. However, if the classes have already been added to the JVM shared class cache, then they will have been added without line numbers. Either comment out the shared class cache (which will dramatically affect performance at startup) for temporary work, or shutdown notes and remove the shared class cache so that it can be repopulated with classes with line numbers. Of course, this will also affect the startup performance, but not so much as not having a cache

These are two of the key lines … to comment them out, add a # to the front of the line

vmarg.Xnolinenumbers=-Xnolinenumbers
vmarg.Dshare=-Xshareclasses:name=xpdplat_.jvm, **line cont**
   controlDir=${prop.jvm.shareclasses.loc}, **line cont**
   groupAccess,keep,singleJVM,nonfatal
jvm.shareclasses.loc=${rcp.data}/.config/org.eclipse.osgi

The shared class cache is typically located in the data/workspace/.config/org.eclipse.osgi

IBM Developer Kit-In-A-Box – Composite Application

I want to bring your attention to a blog entry by Bob Balfe called Labs for “Eclipse, extensions, composites and XPages!” are now available! The site he points to is really cool and has some very nice hands-on exercises on how to do composite applications incl. XPage components and Eclipse components. If you’re new to Composite Applications or want to brush up this is for you.

Ribbon IDE for Lotus Notes?

As you know Lotus Notes is built on Eclipse so following Eclipse plugins and projects makes a lot of sense from a platform point of view. Surfing the other day I stumbled over an Eclipse project that provides a Ribbon IDE for the Eclipse platform. It makes your mind wander to Microsoft centric but it might make sense for other applications incl. Lotus Notes.

For more info see “Eclipse plug-in sightseeing: Ribbon IDE / Eclipse”. There’s also a PDF showing it off.

Fix your calendars week numbering with Notes 8.5.1 FP2

For us in Europe using the ISO standard for week numbering one of the fixes delivered in Notes 8.5.1 FP2 has been a long time coming. Previously when using the calendar regional setting of “Use my operating system regional setting” Notes would still get the week number wrong. Of course the solution was simply to specify “Always use the ISO standard” though it didn’t feel right.

Now with Notes 8.5.1 FP2 there is a fix for this issue and Notes will now behave correctly (at least it does so on my client).

“SPR# FPAI7X7KL3 – There is a preference for how week numbering is handled in the Notes calendar. There are 3 choices for the preference: “Use my operating system regional setting”, “Always use the ISO standard”, and “Custom week numbers”. Prior to this fix, the choice of “Use my operating system regional setting” was not working properly for those users who had their OS regional setting set for a country/language that used the ISO standard. It should be noted that this fix does not make an inspection of the registry settings (on windows platforms). Instead, the fix uses the Java JVM’s settings for week numbering based on the country/language the user’s OS is running in at the time the Notes client is started.

All you wanted to know about the Notes directory structure

All you wanted to know about the Notes directory structure is explained here: “Understanding the IBM Lotus Notes 8.5.x client directory structure” via Stephan Wissel.

“This article explains the changes that were introduced in the IBM Lotus Notes 8.5 File System installation and describes them with respect to the installation, setup/launch/run, and uninstall phases in the client’s life cycle. Also included are answers to some FAQs on the client file system.”

How to get started with plugin development

I get a lot of questions (via e-mail and IM) on how to get started with plugin development for the Lotus Notes platform. Instead of answering them all individually I thought I would (finally) write a general purpose blog post to try and answer these questions in general terms.

First of I’m sorry to say that the current state of affairs for someone who want to get started doing plugin development for the Lotus Notes platform is grim. There is as you might have experienced very little material available for programmers new to the Eclipse world to build stuff for Lotus Notes 8+ clients. To make things worse the material that is available often cut corners or simply start out too advanced. That being said I am hearing muffled voices mention some material being developed and that IBM Lotus is focusing on this matter but it will be yet some time before it’s out. Until that time and until we can upload information directly into the brain like martial arts skills are given to Nemo in The Matrix I suggest the following.

My suggestions for someone getting started would be to start by realizing that programming for Eclipse and hence in SWT for the Lotus Notes 8 client has nothing, what so ever, to do with traditional Notes programming. It sounds obvious but once you have accepted this it gets easier. Maybe not easier technically but easier to accept that this is a completely new field you’re venturing into. If nothing else you stop looking to IBM Lotus for help and instead turn to the Eclipse side of the internet.

Before you start to whine I think this is just fine and how it should be. Really. Initially most of the stuff you need to know to get started has nothing to do with IBM Lotus but is general purpose Eclipse development information. It’s like blaming Toyota for not telling you how to repair their cars. Toyota can be expected to tell you and document what’s so special about their cars. They can’t be expected to teach you the basics – you go to a car repair classes for that.

It’s the same with Eclipse development. Learn the basics and specialize from there. You could say that we could expect information about the various ways to extend the client to readily available and better documented. I’ll give you that… 🙂

Once you’re past that and before you embark on your journey first realize this. In Eclipse and SWT we build everything our selves and we’re left to the mercy of the client and the differences that exist across the different platforms (Notes 8.0.x vs. Notes 8.5 across Mac / Linux / Windows XP / Windows Vista / Windows 7). We’re close to the metal with all the benefits, worries and problems that entail.

So if I had to come up with an action plan for learning about Eclipse / Expeditor / Notes 8+ development it would be something like the following:

  • Learn Java! Become proficient in Java! It sounds obvious but it’s one of the pillars for being successful in this area. Pay special attention to the following areas as they are used heavily when developing for Eclipse:
    • Event publishing/subscription using listeners
    • Anonymous inner classes
    • Interfaces
    • Multithreading
  • Learn about GUI development in general. Resources for developing in Java SWING are just as good as those for SWT as many, if not all, of the concepts apply to both. UI development includes:
    • Widgets
    • Layout managers
    • Threading and the concept on an UI thread. What should and shouldn’t you do on the UI thread!?
  • Learn about Eclipse and the Eclipse platform for building RCP (Rich Client Platform) programs.
  • Buy a book about it such as “Java Developer’s Guide to Eclipse, The (2nd Edition)“. It has been a good help to me.
  • Stop by http://www.eclipse.org/articles and take a look at the articles there.
  • Follow this blog 🙂

As you can see it’s no small adventure you’re starting into. The learning curve may be steep but it’s also rewarding to be able to extend the client beyond belief. If only you’d started learning Java earlier…

Complete guide to manually uninstalling “plugins” from Lotus Notes

As you probably know installing and uninstalling Java extensions (“plugins”) into the Lotus Notes client is easy using either File >> Application >> Install, File >> Application >> Application Management or the widget catalog. Sometimes however this doesn’t work and you’ll have to resort to a manual uninstall. This blog post outlines the way to perform a manual uninstall.

We have to start with some basics though. A Java extension in Lotus Notes (also known as a “plugin”) consists of two things:

  1. Eclipse plugin(s)
    The plugin is where the actual code and functionality is stored together with additional resources such as images, string translation etc.
  2. Eclipse feature
    The feature is what’s actually installed from a Lotus Notes perspective. The feature points to the Eclipse plugins that provides the actual functionality. It’s almso important to note that a single feature may reference multiple plugins.

Both an Eclipse plugin and an Eclipse feature are represented in the file system as JAR-files (files with an extension of “JAR”) and both of them are kept in the file system. A JAR-file is just a fancy ZIP-file with a predefined folder structure. Eclipse Features and plugins are stored in two directories beneath your Notes data directory (<Notes data dir.>/workspace/applications/eclipse/features for the features and <Notes data dir.>/workspace/applications/eclipse/plugins for the plugins).

From the above it may seem obvious that simply deleting these files will uninstall a Java extension – unfortunately there’s a final piece to the puzzle. Lotus Notes also keeps a record of what’s installed in a file called platform.xml (stored in <Notes data dir>workspace.configorg.eclipse.update). Simply deleting the feature(s) and plugin(s) may seem to work but will misbehave for instance when activating the File >> Application >> Application Management interface. The solution is to edit this file as well.

The complete steps to manually uninstalling a Java extension is therefore as follows:

  1. Close Lotus Notes
  2. Open the “features”-directory (<Notes data dir>workspaceapplicationseclipsefeatures)
  3. Locate the Eclipse features to uninstall.
  4. For each Eclipse feature you need to open it and edit the feature.xml file. Locate the <plugin>-tags and fine the names of the referenced plugins. Note that there might be more than one. Combining the plugin id and the plugin version will give the full filename of the plugin (<plugin id>_<plugin version>.jar).
  5. Delete the Eclipse features you’re uninstalling.
  6. Open the “plugins”-directory (<Notes data dir>workspaceapplicationseclipseplugins).
  7. Delete the plugin JAR-file(s) you recorded in the step above.
  8. Open the directory containing the platform.xml file (<Notes data dir>workspace.configorg.eclipse.update).
  9. Edit platform.xml and go to the end of the file.
  10. Remove each entry you see for the features you deleted in the step above.
  11. Save and close the file.
  12. Since Lotus Notes also keeps a record of which Java extensions to load it’s best to start Notes with some parameters to make it recompute the Java extension registry: notes.exe -RPARAMS -clean

Let me know if the above doesn’t work for you.

Please note: Manually uninstalling a Java extension installed via a widget descriptor via a widget catalog/policy will probably just make it reinstall once uninstalled.