Basic Groovy

I'd have put this on the Plugin Portal, but I don't seem to be able to access it. So here it is, very basic Groovy support:

I got an error when I switched to the Console view on Ubuntu Linux, but encountered no such error on Windows. So as far as I know, this works on Windows. Download the ZIP file above and you'll find three NBM files. Install them in 6.0 Preview (Milestone 9) and you'll be able to use the functionality illustrated in the following few screenshots.

First, you'll have two new project types:

Next, when you have a Groovy file, you'll also have a Console view (this is the part that fails for me on Ubuntu Linux 7.04):

In the Source view, you can also run Groovy files, with some broken syntax coloring to confuse you:

Note that some attempt has been made to keep the two views synchronized, the thinking being that you experiment a bit in the Console view and then you adopt whatever you like there in the Source view.

Finally, you can also put Groovy files in Java applications, as can be seen here:

In other words, this is the Coyote functionality, ported to 6.0, with a few other experimental things (e.g., broken Schliemann syntax coloring) thrown in. Use at your own risk.


Thanks Greetjan. I'm looking forward to more Groovy support in NB so I don't need Eclipse with Groovy plugin (I've never used to Eclipse, NB is my favorite IDE ;) ).

Posted by movk on May 20, 2007 at 10:42 PM PDT #

Any reason for this error? Plugin Coyote - Groovy Support cannot match its dependencies: module org.netbeans.modules.j2ee.dd/1 > I'm one of those freaks who only downloaded the basic installer, the one without the whole freaking app server and such. This doesn't seriously need the J2EE descriptors does it?

Posted by Danno Ferrin on May 21, 2007 at 02:16 AM PDT #

Try this one instead:


Posted by Geertjan on May 21, 2007 at 02:21 AM PDT #

Do you if someone is doing the same for Jython/Python? AFAIK this was part of Coyote as well.

Posted by Sven Reimers on May 21, 2007 at 03:34 AM PDT #

Not that I know of Sven. I've taken the Groovy parts of Coyote and have been working on those parts only. Nothing similar has been done with the Jython/Python pieces. Maybe the Jython/Python community should pick up those bits...

Posted by Geertjan on May 21, 2007 at 10:36 PM PDT #

Wow, that's great news. And they would be much better when it would work on Linux. Maybe this can get fixed... Keep up the good work !

Posted by Stefan on May 23, 2007 at 03:44 AM PDT #

So far so good! A great start :) Well done Geertjan!

Posted by Graham on May 23, 2007 at 07:09 AM PDT #

sounds good! Groovy is a great language... But why on Earth Sun hasn't decided to work hard on the support for Groovy and Grails in Netbeans as it has done for Ruby and Rails?

Posted by Davide Gesino on May 30, 2007 at 07:52 PM PDT #

Because not everything can be done at the same time?

Posted by Geertjan on May 30, 2007 at 08:04 PM PDT #

Any idea as to what "cannot match dependency: groovy.ui > 1" might be looking for?

Posted by Rakesh Malik on June 05, 2007 at 05:30 AM PDT #

Is the link on this page the latest version and is it going to move forward as a project?

Posted by Robert on July 04, 2007 at 11:25 PM PDT #

I am looking for seemless Groovy debugging in netbeans. By seemless I mean start debugging groovy, step into java, step out. I have looked at JSWat but it is not a plugin to Netbeans. I need a plugin to netbeans for this I think.

Posted by JimT on August 26, 2007 at 06:24 AM PDT #

Good job so far. Hope for strong NetBeans groovy integration some day... :)

Posted by kawazu on September 06, 2007 at 11:19 PM PDT #

Geertjan, I'm note sure but I think I found a bug.

When I have opened two files, the editor rewrite the
the first to the second :(

It looks weird

I appreciate netbeans 6.0 beta 1. Good job !!!!!

Posted by David on September 10, 2007 at 06:07 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« April 2014