My take on the LotusLive Contacts Sync plug-in and how to install it more easily

I read Chris Tooheys post on the LotusLive contact sync plug-in for Notes 8 (LotusLive Notes Contacts Sync on Lotus Notes 8.5… and why you should care!) with great interest and was very happy to see they didn’t choose to make it a sidebar plug-in. Instead they chose a Tools-action which makes much more sense and which doesn’t take up space in the sidebar. Now it just needs a hook (extension point) into the replication API to sync when I replication with my servers – that would be very nice.

I haven’t really tested the plug-in thoroughly yet but I found it funny that I had to issue a cross certificate to a LotusLive certificate during the install (“CN=www.lotuslive.com/OU=Terms of use at www.verisign.com/rpa (c)05/OU=Lotus/O=INTERNATIONAL BUSINESS MACHINES CORPORATION/L=Phoenix/ST=Arizona/C=US/SerialNumber=DOC:19110616/XX=V1.0, Clause 5.(b)/XX=New York/XX=US”). This is the SSL certificate of the LotusLive.com site. I can actually install without cross-certifying but cannot restart the client until I create the cross-certificate. Maybe Lotus should choose a SSL certificate that is trusted by the Notes client by default.

To make it easier to install I created a LotusLive Contacts Sync widget descriptor which you can use to install the plug-in much more easily than doing the File/Application/Install dance.

To install from this either save the xml-file to your computer and drag it to the MyWidgets sidebar (or use a widget catalog) or drag the link directly to the sidebar.

How dynamic are your Notes sidebar plugins?

If you thought that the MyWidgets sidebar plug-in is doing some kind of dark magic to dynamically add sidebar plug-ins then think again. The purpose of my latest exploration into the World of Eclipse was to find out how I could do the same stuff. It wasn’t easy and took a while but it proved to be easier than I thought (once I knew how of cause). The plug-in I did is rather simple but shows how to dynamically add sidebar plug-ins and associate actions with it much like MyWidgets. If you want to see how it works check out the Flash movie. Now this has amazing possibilities…

As always – this isn’t your ol’ Notes client… ๐Ÿ™‚

Target platform for Sametime 8.0.0/8.0.1 development

Some days ago I posted on developing drag’n’drop support for Notes 8.0.x and Notes 8.5 Standard clients (see “Show ‘n Tell Thursday: SWT drag’n’drop in Notes 8.0.x and Notes 8.5 (19 February 2009)“). When doing this and you have configured your Eclipse IDE to use Notes 8.5 as the target platform you will be missing the Sametime 8.0.0 libraries and hence some classes wont compile. This is easily solved by copying the necessary Sametime 8.0.0 libraries from a Notes 8.0.x install to a directory to your local machine and adding it to the target platform. Below you can see my target platform where I have the Notes 8.5 libraries and the Sametime 8.0.0 classes (third entry).

<img src="https://wp2.mm.heisterberg.dk/wp-content/uploads/2018/02/sametime800_sametime801_eclipsebuildpath.jpg" /S

Drag’n’drop in SWT components

Those who went to my Lotusphere session already know this but doing drag’n’drop in SWT is actually quite easy. All you need to do is define a drag source and/or a drop target. The former is only required if a control in users should be able to drag data from a control in your code. The latter is required if you would like users to be able to drop stuff onto your component.

When setting up a drag source or a drop target you specify the control the source/target controls and the types of data you can provide/accept. These types are called Transfer types and are subclasses of the org.eclipse.ui.dnd.Transfer class.

Transfer types that might come handy – the class names should be pretty self-explanatory:

  • org.eclipse.swt.dnd.URLTransfer.getInstance()
  • org.eclipse.swt.dnd.FileTransfer.getInstance()
  • org.eclipse.swt.dnd.TextTransfer.getInstance()

Making a JFace viewer a drop target is simple passing in the underlying control:

DropTarget dropTarget = new DropTarget(viewer.getControl(),
   DND.DROP_DEFAULT | DND.DROP_MOVE);

Once the drop target has been created you set the transfer types:

final Transfer[] dropTransferTypes = new Transfer[] {
  type1,
  type2
};
dropTarget.setTransfer(dropTransferTypes);

The last thing you need is to add an instance of DropTargetListener or use a subclass of DropTargetAdapter as I do here:

dropTarget.addDropListener(new DropTargetAdapter() {
  ...
  ...
});

Creating a drag source is analogous.

The stuff you need to test plug-in deployment in Notes 8

While testing the plug-in deployment features of Lotus Notes 8.x I needed some plug-ins to actually install. They needed to be small, not to have any dependencies on the platform as such as well as having a manageable, and known, dependency graph. Also I needed multiple versions to test installing different versions, upgrading and uninstalling. For this specific purpose I wrote a couple of very, very, very simple sidebar plug-ins (very simple – they just display the version of the plug-in) to play around with.

I now have two plug-ins packaged into two features – Feature 1 and Feature 2. Feature 1 depends on (a specific version of) Feature 2 which in turn doesn’t depend on anything else than the platform (Eclipse core). This means that I can test installing different versions of Feature 1 and verify that Feature 2 is also updated accordingly.

I have made these features publicly available so if you need something similar read on.

Feature dependencies

The below table shows the dependencies between the two test features provided. The table should be read so that Feature 1 v. 1.0.1 depends on Feature 2 v. 2.0.0 and Feature 1 v. 1.1.1 depends on Feature 2 v. 2.0.2.

Feature 2 version
Feature 1 version 2.0.0 2.0.1 2.0.2
1.0.0 X    
1.0.1 X    
1.0.2   X  
1.1.0   X  
1.1.1     X

Installing the features

You can test installation of the features in one of two ways. Either use an update site I provide or use the widget descriptors to install using a widget catalog or the My Widgets sidebar plug-in.

To use the update site point your Update Manager at http://update.lekkimworld.com/testplugins/site.xml and make sure that, when you install, untick the “Only show the latest version of a feature per update site” when selecting features.

Failure to do so will result in your only being able to see Feature 1 v. 1.1.1 and Feature 2 v. 2.0.2. Unticking the box will allow you to select any combination of features you would want to test.

To use the widget descriptors right-click and save the below widget descriptors to your system and use them directly by dragging them onto the My Widgets sidebar plug-in or import them into a widget catalog.

Quick survey: What would it take to get you started with Java in Notes?

Update: Let’s focus on Java development for Notes – not necessarily plug-ins but simply what would it take to get started with Java – the programming language as that is the first obstacle.

I’m running across quite a lot of people who would like to do sidebar plug-ins and general plug-in development for the Notes 8 platform but who are lacking the Java skills required. Many times they haven’t actually taken the time to learn Java at all since the IDE support in Domino Designer is so poor. Based on this I started thinking about how to get Notes developers started developing in Java. So…

What would it take for you to get started with Java in Notes?

  1. Up-to-date editor in Domino Designer – I wont use anything else!
  2. If it is made easy to develop, test and debug in Eclipse I can live with manually having to move the code to Notes for production use.
  3. It’s not the tool support which is the problem – it’s the lack of time, documentation, API’s, management support or this other thing (please state reason)
  4. I’m not at all interested in Java – I want to develop plug-ins using a scripting language.
  5. Other (please state reason)

Please post your response as a comment and a little explanation if you chose “Other”. If you chose option 2 I might just have a solution for you… ๐Ÿ™‚

Thanks.

SWT visual designer


Up to now I have been doing all my Notes 8.5 sidebar UI development manually and coding the UI by hand which is and has been fine. Now getting a WYSIWYG editor is becoming increasingly important both for quick development, demos and for education situations. I went searching for one and found SWT Designer from Instantiations. The editor looks very, very nice (take a look at the demos) and being priced at 239 USD also very competitive from a price standpoint.

My search continues for alternatives but this looks very attractive.

Lotusphere 2009: Preferences in SWT components

On the demos I have done for my Lotusphere 2009 session is a demo on how to use the extension point to extend the preferences dialog box (File/Preferences…) in Notes 8. As always a demo makes it easier to comprehend so download and explore to your heart’s content. Questions are welcome here or at Lotusphere.

com.ls09.bp106.prefs

Otherwise I recommend the Eclipse User Settings FAQ

SWT @ Notes 8: Network awareness from SWT components

One of the big strengths of having Notes 8 built in Lotus Expeditor is that you have access to all the functionality of the underlying Expeditor platform including its services. On if the nice ones is that you can be notified when the underlying network connectivity is available and/or unavailable.