Pervasive DataRush

This blog is syndicated from the Pervasive DataRush site.

Matisse for Eclipse?

I've been working on KNIME plug-in development recently for Pervasive DataRush, and found myself wishing that there was a Matisse for Eclipse. As it turns out, as long as you are using Swing ( as is the case of KNIME ), you can use Netbeans to create a form which then runs in Eclipse! This is possible in the latest version of Matisse, since the generated java code uses GroupLayout, a standard part of the JDK.

The one trick is that Netbeans can only create a Matisse form in a Netbeans project. However, once created, it can be copied to an Eclipse project and then opened within Netbeans for additional editing and maintaintance.

Here's a full example:

  1. In Netbeans ( I'm using 6.8 Beta ), go to File->New Project, Java Application, Finish 
  2. Right-click on "Source Packages"->New->Java Package, specify your package name, example "org.example"
  3. Right-click on "org.example"->New->JDialog Form, specify a name, "ExampleDialog", "Finish"
  4. You're done with this Netbeans project; you can now close it
  5. Now, outside of Netbeans, copy ExampleDialog.java and ExampleDialog.form into your Eclipse project.
  6. Inside Netbeans, File->Open File..., specify the location of ExampleDialog.java in your Eclipse project.
  7. You can now edit the form as you would normally.  

Here are a couple of caveats to keep in-mind:

  1. When running in this mode, I've sometimes noticed a bug in Netbeans where the palette doesn't show up. If this happens, you can workaround by adding components in the "Inspector" window. (It has a right-click menu item "Add From Palette").
  2. Eclipse doesn't prevent you from editing the "Do Not Edit" sections of the generated java, so be careful not to edit them.

The following link provides a good tutorial on using Matisse:

http://www.javapassion.com/handsonlabs/nbguibuilder/

Comments

No Comments