Download NetBeans!

20070331 Saturday March 31, 2007

Matisse for Groovy: The Early Days

I'm beginning to investigate the rewriting of Matisse for Groovy. What is abundantly clear, thus far, is that it will be impossible to support both Matisse for Java and Matisse for Groovy in the same NetBeans IDE. However, I suspect that SwingBuilder users (i.e., Groovy programmers) are not interested in programming straight Swing simultaneously with SwingBuilder, so that's okay.

The biggest problem is not the rewriting of the templates (e.g., there's a JFrame template that should be rewritten to a SwingBuilder Frame template and so on) that are used to generate the code. But the problem is that Swing containers like JFrame are represented in the IDE by two files simultaneously, a Java file and a Form file. The point is to change that representation from a Java file to a Groovy file. So, when a Groovy file is opened, there should be a Form file in the Design view for the layout and structure of the container, and a Groovy file in the Source view. That is the difficult part that I'm struggling with, meaning that I have to rewrite code in the "Form" module (which is the module that provides the Matisse GUI Builder).

The good news is that I've been able to take the Form module and completely separate it from the rest of the NetBeans sources, so that it is now part of my own module suite. And I've integrated my Groovy support code (e.g., Schliemann) into that Form module. Together with the "Coyote - Groovy Projects" module from the Coyote site (slightly modified as described in earlier blog entries) and the Groovy JAR from the embedded folder in the Groovy download, that's currently all I need for my module suite.

So, I now have three tabs (look at the toggle buttons below, for "Source", "Design", and "Console"). The Design view will be where Matisse will do its thing. Visually, this is how it looks:

Once I get the FormDataObject to work with Groovy instead of Java, assuming that is even possible, things should be well on their way to us having a Matisse for Groovy.

Mar 31 2007, 01:54:18 PM PDT Permalink