Martin Adamek is a Sun employee and works on the Groovy plugin for NetBeans IDE. In this interview he talks about the current status of the plugin, how he piggybacks on the JRuby plugin and how the community could help out. Enjoy.
Q: Hey Martin, you're working for Sun on the Groovy and Grails plugin for NetBeans IDE. What's the status?
A: We started the real work on the Groovy and Grails plugin at the end of November. Currently there's just me and a colleague from Germany, Matthias Schmidt, contributing to it. So far we were able to create a Grails project type and we've also integrated GSP syntax highlighting into the NetBeans HTML editor.
Plus, we also have large parts of a Groovy editor and we've reenabled some parts of the old Coyote project. From Coyote, we're using mainly the Groovy project type, although that will be removed soon in favor of the integration of Groovy with all the NetBeans Java-based project types.
At the moment, our main focus is on the Groovy editor, where we're continually enabling new features. For now, we've got lexical and semantical highlighting, occurrence highlighting, code templates, folding, and error highlighting.
Q: The Groovy and Grails plugin will re-use parts of the JRuby plugin. What can we expect from that?
A: We are lucky that Tor Norbye did a great job providing first class Ruby/Rails support in NetBeans IDE. In the process, he introduced several new APIs that will allow us to focus on our Groovy features, rather than on the language infrastructure.
What that means is that there are no stoppers preventing us from delivering first class support for both Groovy and Grails, of the same quality as our Ruby/Rails support. It is just a matter of time and resources how far we get and how quickly we do so. The list of features should basically end up matching that of the Ruby/ Rails plugin.
Q: Geertjan mentioned here on DZone that he expects the Groovy plugin for NetBeans IDE to match the Intellij plugin during the course of 2008. Wouldn't that be great?
A: Vaclav Pech from IntelliJ is doing a presentation here in Prague that will include Groovy support in IDEA. So, maybe I should go there and find out what Geertjan was talking about... Just kidding. But, seriously, as far as I know, the Groovy support in IDEA is great.
It wouldn't make any sense for us to not aim for the same quality. In other words, as with IDEA, we should have Groovy integrated in the IDE in such a way that one shouldn't see any difference when switching between Java and Groovy functionality. So, I want Groovy to be a first class citizen of NetBeans IDE.
Q: What Grails-specific features can we expect?
A: We support Grails projects out of the box already. Just install the Groovy/Grails plugin and then you can immediately open any existing Grails project. What is very cool is that you do not need to import anything. Plus, very importantly, no NetBeans specific metadata is added to the Grails project directory!
We also have wizards for new applications and most of the Grails artifacts. Our wizards act as a wrapper around the Grails targets, you can customize your environment, such as the ports, and then you can run the application from within the IDE. We are also preparing very strong integration with the GlassFish application server. Of course, things like Grails-aware code completion and refactorings are high on the list too.
Q: What are the biggest challenges to get the Groovy language editor to the level you'd like? Could you use some help from the community?
A: Definitely the integration with Java. We aren't there yet, though. Based on our first impression, it seems that the Groovy compiler uses classloaders to attribute references to Java classes. For us this is a problem, as we are using JSR-269 for representing Java types and for processing them. If Groovy developers could change that, that would be a very big help.
Anyway, the best help we could get from the Groovy community, apart from direction contributions to the code, is testing the work we've completed thus far. There are already several active users filing bugs for our plugin, which is great. Because it's still Alpha quality, we haven't delivered any official milestones yet.
Q: Are there any improvements to Groovy or Grails you would like to see that would make IDE integration in general easier?
A: Rewrite the compiler to use JSR-269? Provide Java APIs to access Grails internals, such as targets? Plus, Groovy AST nodes could provide an offset, in addition to the line and column numbers.
Q: Is there a place where people can track the progress you're making on the plugin?
A: First, users can install the plugin from daily builds of NetBeans 6.1. In addition, we've made all the project's information available at http://wiki.netbeans.org/Groovy. Finally, read my blog for all the latest updates!
Thanks for the excellent interview Martin!