A powerful function…

Many have downloaded, looked at, and have commented on the source code for the attachment viewer project but some may not be aware of a powerful function the SWT Browser brings to the table.  As described in a past post about the architecture, the line where the browser is connected with the embedded browser process (its actually a dotted line) is where this call happens.  The function, or method, is the execute method on the SWT browser.  This allows you to run essentially any JavaScript on a given web page or DOM.  The attachment viewer uses this method to call a JavaScript function named “showAttachments()”.  The Eclipse Java code takes the current selection – which in this case it looks for IAttachment – and then passes a set of URL’s and JSON to that JavaScript function.   This is how easy it is to “connect” the web world with the Eclipse world.

String cmd = "showAttachments(" + jObj.toString() + ");";
 if (browser.execute(cmd) == false){

Open Source, graphics, and me – not a good mix

Because of IP laws and such, I had to create an icon for the attachment viewer project so tonight I decided to figure out how I will do this.  I am no artist by far but I do have some pretty easy to use and free tools at my disposal.  I figured the best way is to use some kind of presentation editor like Symphony, then use GIMP to actually size and save the image as a jpeg.  The paste into GIMP was not very good so I basically scaled it down and took a screen shot to get a good icon sized image.  In the end, this was pretty easy but I would be interested in hearing how some of you artists do this stuff.

Click to make larger

In the end the icon looks pretty good in the Notes client – I am no Picasso so this will have to do!  Check out a screen shot of the new view icon in the upper left of the viewer:

Click to make larger

Attachment Viewer update

Just an FYI, I have commented in a few places on my blog but in case you missed it.  If you have the second update of the attachment viewer and are running on the Mac you can uninstall and then reinstall the Widget to get it working again.  You need to actually uninstall the widget from My Widgets and then drag the bitmap below (which points to the extension.xml) back on to the My Widgets panel.

Sorry for the inconvenience.

Extension Points and OSGI services, what’s the difference?

If you are new to Eclipse you may have heard of Extension Points and OSGI services.  Then, when you learn what each of them are you might ask yourself “Why two ways to provide extensibility at the code level?”.  I have been asked this many times over the years and my responses are probably more confusing than helpful.  Neil Bartlett has an excellent article about this and it is a must read.  Why is this important?  Well, if you are following the Domino server and other server based technologies you hear about “we support OSGI services” – that means that services, not extension points, are supported.  My attachment viewer is another good example.  I want my conversion/preview servlet to be used both from a Domino Server side and from a local web container side.   Given that, OSGI services is the choice!

More to come on that…

Testing your code…

As many readers have been reading on my site the attachment viewer has gotten a lot of attention both on the site, internally at IBM and also in my personal email.  This last update actually broke in a couple of places – first was the MAC issue where I unintentionally put requirements on a specific bundles (something that Eclipse does automatically when you select a dependency).  And second – the debug options are displaying by default.  I figured I would take this time to explain what the debug options are.

  1. This is the URL of the page, I use this URL to open the viewer in an external browser for testing (Firefox, etc).
  2. This is the information passed into the JavaScript side of the application
  3. This is the JSON representation of the array passed into the selection handler in JavaScript.  You can copy and paste this into the #4 area and click Submit to test the viewer in the external browser.
  4. The form used in the external browser to test the viewer with a specific content type.

I have since added a preference screen to enable the Debug options as an end user and this preference screen will be used for more future preferences.

Since this is really a weekend and night project I will be working on it as so but I am also pretty excited to work on this because of the many people already playing with it and providing feedback.

My next steps are to make the Syntax highlighter an OSGI service and introduce the OSGI service extension so more converters can be added easily in the future.

Hopefully I can get an update out before the end of the week.  The first thing I need to do is come up with a basic test script so I am not causing stupid regressions!

Residency Announcement: LO-0W01-R01 Developing Customized Components for Lotus Notes, Sametime, and Symphony

Passing this information on for the Redbooks team.

Benefits to Resident:  Do you have experience developing customized components for Lotus Notes, Sametime, and Symphony? Are you interested in showing how to make the most of those powerful add-on capabilities within our Lotus collaboration environment?  Would you like to contribute your knowledge to a new wiki deliverable project?  If so, we want you to join our virtual team.

By participating in this residency you will gain hands-on, practical experience in working with Lotus Expeditor, Lotus Notes, Lotus Sametime and Lotus Symphony. You will also interact remotely with other highly skilled residents, and members of the Lotus product management and development teams.

The ITSO in conjunction with Lotus is conducting this remote residency to create a new deliverable that uses wiki technology. Wikis are a relatively new Web browser-based technology that allows remote collaboration to create a new form of on-line document.  You can be a part of this leading-edge effort for a new way of delivering quality technical documentation. Getting involved in this project will give you an opportunity to learn and share tools and techniques about the Lotus design tools, and as with other ITSO residencies, to pass your knowledge to other IBM employees, business partners, and customers. Working alongside and exchanging knowledge with other highly skilled residents and some of the top experts in the IBM Lotus community, you will develop a competitive edge that will serve you well in developing customized components for Lotus Notes, Sametime, and Symphony. In addition, you will get recognition for being an author of this wiki!

This residency begins 30 Aug 2010, ends 01 Oct 2010 (5 weeks), and requires 5 residents. The residency is running in No primary location.

Nominations should be submitted online on the Web by 13 Aug 2010.

The residency leader is Axel Buecker whose email address is axelb@us.ibm.com.

Note:  ITSO pays authorized travel and living expenses for all residents, but does not compensate for the time or services of its residents.  For IBMers, ITSO residency travel is pre-approved.

Residency Description:

Business Partners and ISVs play an integral role in both selling and adding value to our IBM Lotus portfolio. We have learned a great deal on how to successfully enable new ISVs, from startups to leading industry players, and are looking forward to expand this program by building out a definitive Redbooks wiki guide.

Specific topics we will cover include:
* Business context
* Architectural components
* Developing Menus and Actions
* Developing Toolbars
* Developing Sidebars
* Leveraging Notes-specific APIs
* Leveraging Sametime-specific APIs
* Leveraging Symphony-specific APIs
* Debugging
* Performance
* Usability

Objectives:  This residency will create a new Redbooks wiki online deliverable called “Developing Customized Components for Lotus Notes, Sametime, and Symphony” using a Domino-based wiki tool, hosted by Lotus on developerWorks.

To submit a nomination, you must use the online web nomination form:

Business partners can go directly to this announcement and its online nomination form using this link:

IBMers with access to the IBM Intranet can go directly to this announcement and its online nomination form using this link:

All residency information is available by clicking Residencies on the IBM Redbooks Internet site at http://ibm.com/redbooks.  Employees of IBM will prefer using the IBM Intranet site http://w3.itso.ibm.com.  The websites fully describe the residency process and offer online nomination forms.

Demo: Installing the attachment viewer into Lotus Notes

Many people have emailed me or asked how to install the attachment viewer into Lotus Notes 8.5.1 and above. The easiest method is to use the My Widgets view in the Lotus Notes client. Starting in Notes 8.5.1 you can actually install Eclipse features and plugins using this method. The video below shows how you can do this, I even show how you can enable Widgets in the Lotus Notes client.
Continue reading