Wednesday, August 7, 2013

Contextsensitive help for Notesplugin developer in Eclipse

When you develop plugins for the notes platform the target platform, does not contain any javadocs. So you do not get context sensitive help on java classes in Eclipse. This makes the development especially for beginners needlessly difficult and annoying.

Here is an example: You want to make a new SWT Text Field and get only a the Constructor signature with not very helpful parameter names. What the hell is arg1? So you have to open a browser go to the javadocs of SWT and search for the Text class and after reading the description go back to eclipse.


Wouldn't it be so much nicer if you can get useful parameter names and the javadoc direct in the syntax completion window like you get it when you develop plugins against the standard RCP target.

Follow this steps to teach the eclipse IDE that it shoukld search for the source in another place.

First go to your plugin in the package Explorer in your eclipse IDE. Open the  "Plugin Dependenices" and search for the plugin for which you want do add java source. In our example this is org.eclipse.swt.win32.win32.x86.versionNumber.

Download the Eclipse RCP source from the eclipse download archive page in the correct version. In our example the correct version is 3.6.2.

Unzip the "org.eclipse.swt.win32.win32.x86.source.version.jar" from the downloaded SDK to a new directory where you want to store all java source packages for Notes. Do not place this directory somewhere in the Notes program directory.

Right click the Notes plugin in package explorer and select "Properties" from the context menu. Paste the fully qualified path to the extracted source plugin in the Location path or select external File and browse to the source plugin file. Then finish the dialog with ok. Now your have context help for every SWT Class in your eclipse IDE.

You can repeat the above steps for other plugins in Notes which are eclipse based, for example jface, eclipse forms or the workbench. Be aware, that most other plugins are not version 3.6.2, but 3.4.2. So you have to download the 3.4.2 SDK from the download archive.

I think this is really a great step forward for every plugin developer for Notes.

No comments:

Post a Comment