Steven has posted 36 posts at DZone. View Full User Profile

Martin Adamek: Building Groovy & Grails Support for NetBeans IDE

02.14.2008
| 10712 views |
  • submit to reddit

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!

Published at DZone with permission of its author, Steven Devijver.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Markus Jais replied on Fri, 2008/02/15 - 2:07am

Thanks for this interview. Martin and Matthias are doing an amazing job here. I am sure Netbeans can be the best

Groovy IDE out there. I already use Netbeans for all my Ruby work and I am looking forward to all the good

Groovy stuff.

Markus 

http://www.codekite.com

Brenden Maher replied on Tue, 2008/04/01 - 12:08pm

Above it says-

In development build of NetBeans you can go to Tools->Plugins and search for ‘groovy’. Then select found item and press Install. I have netbeans 6.1b installed but the search comes up empty? What am I missing?? What is the  dev build of netbeans? Isn't that 6.1beta??

 

Thanks

B. 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.