Wednesday, August 5, 2009

Running Bioclipse Plugin Unit tests: solving the XPCOM error

Sometimes you can feel so stupid. For example, when the answer is right on front of you, but only after many hours you realize the right question belonging to that answer. For example, take this answer:
    add the line: -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner
This is the problem I was trying to solve: I'm running 64bit Ubuntu Jaunty with Eclipse 3.4.2 for Bioclipse development. The answer above is the correct answer. So, I added the line. To the $HOME/eclipse.ini and to the eclipse command line to start the program. But I still good not run Bioclipse plugin unit tests; I kept getting that stupid error:
    org.eclipse.swt.SWTError: XPCOM error -2147467262
    at org.eclipse.swt.browser.Mozilla.error(Mozilla.java :1638)
    at org.eclipse.swt.browser.Mozilla.setText(Mozilla.ja va:1861)
In retrospect, I was sort of asking the wrong question. I should have asked myself not why I got that XPCOM error even though I was using the solution, but why running the unit tests was not affected by that solution. Realizing that, it became so obvious: the plugin unit testing was using a clean environment, not based on the Eclipse environment I was working in; therefore, adding that line to my Eclipse environment did not help. Instead, I only had to that line to the Run Configuration of my plugin unit tests too:

Surely, there are aspects to this which helped me overlook this solution. For example, I had installed Eclipse freshly yesterday, and then the it worked fine. Only after installing some EMF and GEF features, it stopped working again. Bitten by the correlation/causation pattern :(

Sunday, June 21, 2009

Chemistry in Eclipse: Bioclipse-JChemPaint

The Uppsala and EBI CDK-teams have been working hard on finishing the rewrite of JChemPaint I started with Niels earlier. While the EBI-team focused on the applet (and Swing application), the Uppsala team, obviously, focused on the SWT side, for integration into Bioclipse. The new JChemPaint is reaching a useful state, and below is a quick update screenshot something Arvid has been working on:

It shows a periodic table which allows you to drag any element type onto the JChemPaint drawing area. It is using regular drag and drop functionality, allowing you to create any arbitrary pseudo atom too. This also paves the way for a template system, allowing you to drag-n-drop fragments onto an active JChemPaint editor.

Tuesday, May 19, 2009

Eclipse-Spring Export problem: uses conflict for spring aop

And I just got around to grasping some more of the details of handling dependencies with plugins. Bioclipse has a product file, which uses features to run it. That works fine. It also uses Spring (version 1.0.2 in our case) in a set up where we use custom managers to do stuff, like run things from a JavaScript environment (e.g. this), but use the same methods to be run from Bioclipse GUI elements, like buttons, menus and wizards. The Spring framework ensures the proper thread is used, and also provide recording (thanx to Jonathan for doing all this).

However, a recent refactoring broke exporting Bioclipse (which introduces a new plugin net.bioclipse.managers), It still runs fine from within Eclipse, but the exporting fails with this error:



Last night, I tried many things, on top of what Jonathan has been trying for the last few days. Using git bisect I pinpointed the exact commit that caused it to fail (which is the earlier linked revision 10373), but could not find where we are actually referring to multiple Spring bundles. Our Spring bundles are in these jars and that has worked for a very long time.

I have no clue why it finds this conflict, and am clueless on how to further debug the issue. Any comment is most welcome! No matter how insignificant it may seem, I am sort of stuck and any tip will likely allow me to move forward. Thanx!

Monday, May 11, 2009

Which feature must I install for org.eclipse.zest?

Dear lazyweb!

I have been trying to figure out which Eclipse 3.4 feature I must install from the update site to get the org.eclipse.zest plugin in my environment.

I installed the Zest feature (which I am going to use to visualize an RDF network), but my workspace still complained that I did not have the plugin.

Maybe I should rerun Set Target Platform for our product, but I and others in the Bioclipse development community have been wondering how we can know what feature to install via the Software Updates... to get a particular plugin on your machine?

Looking forward to hearing from you,

Kind regards,

Egon

Wednesday, April 15, 2009

Bioclipse2 Scripting #3: XLogP calculatation using a XMPP CDK cloud service

In preparation of the CDK workshop next week, here is a small Bioclipse2 script to calculate the XLogP value for a given SMILES, using the a CDK-based XMPP service:


Earlier in this series:

Multiple inheritence for content types?

Bioclipse is an environment for handling and processing life sciences data. This data is present in files with a wide variety of formats, each of which can contain a particular data type. For example, a we can have a single molecule in MDL molfile and in CML.

The latter is particularly interesting, as I do not know how to work that out... Firstly, I want the CML (Single Molecule) content type extend the CML content type, so that a validating CML editor can open it with the proper schema, but at the same time I would like to extend it a content type representation a Single Molecule. Hence, the multiple inheritance.

This is what the plugin.xml currently looks like:
<extension
point="org.eclipse.core.runtime.contentTypes">

<content-type
base-type="net.bioclipse.contenttypes.cml"
id="net.bioclipse.contenttypes.cml.singleMolecule2d"
name="CML (Single 2D Molecule)"
priority="high">
<describer class="net.bioclipse.cml.contenttypes.CmlFileDescriber">
<parameter
name="dimension"
value="2D"/>
<parameter
name="cardinality"
value="single"/>
</describer>
</content-type>

</extension>
Very clearly, a single base-type. Is there any option of multiple inheritance?

Tuesday, April 14, 2009

Bioclipse: a powerful Jmol application

While Bioclipse is much more, it could be an interesting alternative to the Jmol application. It offers:
  • a scripting console
  • a file browser (the Eclipse way)
  • an outline of the file content which allows selections
  • a script editor
The underlying RCP toolkit has many other interesting features for a Jmol application, but the above is up and running: