Update on Groovy and Grails in NetBeans

It’s more then a month since I announced that we started to work on Groovy and Grails in the NetBeans. Maybe it’s time to look at what’s new since then and what are the next steps. Matthias Schmidt made enhancements in the Grails project support:

  • Grails components wizards
  • Grails shell
  • Setting port for embedded Jetty server in project properties
  • Setting active Grails environment in project properties

In Groovy editor Gopal Sankaran added keywords completion. I was working on some infrastructure tasks and tried to make first shots of some editor features. I made example of semantic highlighting (coloring of field declaration) and occurrences highlighting (for local variable). Now it should be pretty easy to add all other semantic highlightings and their options and also occurrences finding for all kinds of elements. I spent significant amount of time also fixing issues reported by users. That’s great we have such a feedback even before we released first milestone!

groovy01.jpg

Next step will be to open the door to the smart code completion and later interoperability between Groovy and Java in editor. With that in mind – I plan to drop standalone Groovy project and prefer Java SE project as main project type for Groovy development. Groovy will be extension to all NetBeans Java project types. What do you think? Is it a good step?

Btw. I am building one simple .com website in Grails and still wondering when some problem is going to happen. And still nothing. It’s getting better and better every day, required changes are easy to implement, all functionality I need is provided by framework itself in some magic closure or tag, every line of Groovy code solves some business logic of my app and is so easy to read and write for poor Java guy… hmm, where’s the problem?

13 Comments

Tom CorbinJanuary 9th, 2008 at 01:57

Yes, I’d like to be able to add the groovy aspect to existing projects. I don’t want to have to create a groovy/grails project or to have to recreate my current project just to add groovy or grails to it.

We’ve got way to much set up for me to want to do all that.

Guillaume LaforgeJanuary 9th, 2008 at 15:07

Regarding your question on adding some kind of Groovy extension / nature to a usual Java project, yes, of course, that makes sense.
I’m very happy to see such progress on the NetBeans support!
Congratulations and best wishes for 2008.

Stefan SaringJanuary 9th, 2008 at 16:36

Yes, it makes more sense to add Groovy support to normal Java projects.

FilipJanuary 14th, 2008 at 23:47

Hi Martin,

I wish you all the best in 2008!
I have just one question: when do you plan to release thin new version of plugin?

Best regards,
Filip

Martin AdamekJanuary 14th, 2008 at 23:51

Well, unfortunately plugin is developed against latest APIs, so it won’t e available for 6.0 final anymore. You’ll have to use 6.1 daily builds or milestones.

Markus JaisJanuary 17th, 2008 at 10:29

This are great news. Thanks for all your work!!
I think it would be good to add Groovy support to normal Java projects.

Jacques LedouxJanuary 17th, 2008 at 15:19

Yes, absolutely, please, Groovy is an integral part of our Java projects and we need that inter-operability between the two languages.

Thanks and bravo for your product.

SooyoungJanuary 18th, 2008 at 04:06

I’m try to create a new Grails project in Netbeans (6.1 build 200801171200) with the new plugin and am getting this exception. I properly set the grails home property for the plugin.

java.lang.AssertionError: Null DataObject provided by org.netbeans.modules.groovy.grailsproject.ui.wizards.NewGrailsProjectWizardIterator@1dba089
at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1033)
at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:595)
at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:416)
at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:253)
at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:165)
at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1384)
at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1341)
at org.openide.WizardDescriptor.access$1600(WizardDescriptor.java:119)
at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:1908)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)

Anyone else getting this?

Martin AdamekJanuary 18th, 2008 at 10:13

Sooyoung , you are facing this bug: http://www.netbeans.org/issues/show_bug.cgi?id=124527
Should be solved soon.

hohonuuliJanuary 20th, 2008 at 04:00

I use groovy in my Maven projects (using the Groovy maven plugin) The source for the groovy code typically lives in /src/main/groovy. I just want to mention this because it would be great to have a ‘groovy aspect’ that works with Maven projects opened in Netbeans.

jianwu_chenJanuary 30th, 2008 at 16:17

Thanks for the great effort. I’m looking forward to see the release of this feature. I believe lots of the java people are waiting like me. You are doing great work.

I’m also using groovy scripts as part of my WEB maven project. So hope you can take care of the groovy support in the maven web project using the maven plugin.

WagnerFebruary 7th, 2008 at 02:05

Hello,

I dont work plugins Grails for Netbeans. Why? I get error: “grails: JAVA_HOME is not defined correctly; can not execute: java” I set JAVA_HOME, GROOVY_HOME, GRAILS_HOME, but unsucessfull.

Thanks

UnisonFebruary 21st, 2008 at 01:35

Nice work, guys!!!