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
Posted by Brian Moelk on March 31, 2007 at 07:34 PM PDT #
Posted by Jacek on April 01, 2007 at 01:07 AM PDT #
Posted by Geertjan on April 01, 2007 at 01:10 AM PDT #
Posted by Markus on April 01, 2007 at 11:05 AM PDT #
Posted by Maxgen on June 17, 2007 at 01:01 PM PDT #
What are the chances of getting rid of that bloody XML file for Matisse altogether. It seems we could do a lot with annotations. Also, Visual Studio's Form editor which works much the same way are using partial classes for this (generated code in one, user code in another) and it works great.
It's been over two years since this post. What's the status of this? Is there a way to build a Groovy Swing app with a graphical designer?
No. This stuff was pretty experimental and no progress has been made on it.
Posted by Geertjan on April 28, 2009 at 08:21 AM PDT #


