wood burning stoves 2.0*
The moose likes Groovy and the fly likes best IDEs, editors for Groovy/Grails? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Groovy
Bookmark "best IDEs, editors for Groovy/Grails?" Watch "best IDEs, editors for Groovy/Grails?" New topic
Author

best IDEs, editors for Groovy/Grails?

Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Scott and others - any input on which IDEs or editors are best for Groovy and Grails? What do you use? I know IntelliJ has a plugin which I've jsut downloaded, and I'm pretty sure there's one for Eclipse. Any preferences?


"I'm not back." - Bill Harding, Twister
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I've used the IDEA plugin and while the groovy bits work well its been hit and miss with the grails plugin. I can't think of any specifics off the top of my head and it's been a few months since I've looked at it but I just remember having issues with many of the features like kicking off generator scripts and what not.


GenRocket - Experts at Building Test Data
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Thanks, Gregg.

A related question I'd add: for Java, we (here at JavaRanch at least) usually recommend that people first learn the basics without an IDE, because it hides too many details that you really should learn. Do Scott and others think that anything like that hold true for Groovy/Grails?
Dave Klein
author
Ranch Hand

Joined: Aug 29, 2007
Posts: 77
Forgive me for jumping in, but I also use IDEA with the JetGroovy plugin and it is working very well for both Groovy and Grails. Some of the generate scripts were not directly supported in earlier releases but they are in the latest. Even then it was easy to jump out to a shell and run those scripts.

The syntax highlighting, code completion (to an extent), refactoring and debugging are a huge productivity boost but the IDE does not really do anything for you that you would need to learn to do yourself. Much of what Java IDEs do in that regard is boilerplate code. And I agree that when you need to work with that stuff yourself and you're used to your IDE doing it you can get stuck. But with Groovy and Grails there is so much less boiler plate code so that issue all but goes away.

Just another POV,
Dave


Author of Grails: A Quick-Start Guide
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I started playing around with Spring's Scripting support using Groovy tonight so I got to use the plugin quite a bit while creating my Groovy code. Just some notes:
  • When you try and use a class in a groovy file that needs to be imported you don't get the normal notification. You can still alt+enter on the class and then you get prompted for the correct action but auto import on alt+enter is no longer available.
  • When creating a new groovy file if you choose script, even though you are in a package, the package statement is not generated for you. If you tell IDEA you want to create a Groovy class then all is well. This isn't good or bad. Just something to be aware of.
  • Autocompletion is so-so. Yes, I am aware that Groovy is somewhat of a dynamic language however something as simple as accessor methods, IDEA should be aware those are automatically available and allow autocompletion for you. On the other hand it does autocomplete for message.message and since in Groovy that is the same as message.getMessage() I suppose its fine. But I still think IDEA should be smart enough to know that getMessage() is available.
  • I can't find a way to tell IDEA to execute scripts as scripts. IDEA compiles them to bytecode prior to executing. Is this a big deal? Probably not and the code executes faster but seems unnecessary if I could turn it off.


  • That's all I came up with so far. If I find anything else I will post it here.
    [ February 19, 2008: Message edited by: Gregg Bolinger ]
    Gregg Bolinger
    GenRocket Founder
    Ranch Hand

    Joined: Jul 11, 2001
    Posts: 15299
        
        6

  • I created a class in a package and I needed to move it to a different package. I used IDEA's refactor and moved it to the new package however the package declaration in the groovy file didn't update to reflect its new home.

  • Gregg Bolinger
    GenRocket Founder
    Ranch Hand

    Joined: Jul 11, 2001
    Posts: 15299
        
        6

  • When implemeting an interface or extending an abstract class with abstract methods, IDEA doesn't warn you about required methods that need to be implemented. You can still alt+insert to see what needs to be done but until you compile/run your groovy code you won't know about it.
  • Burk Hufnagel
    Ranch Hand

    Joined: Oct 01, 2001
    Posts: 814
        
        3
    How about a good plug-in for NetBeans or Eclipse. Mostly I'm looking for a worthwhile debugger.

    I tried one a few months ago (Coyote, I think) and I could set a breakpoint in Java code that was executing a Groovy script and step into the Groovy code, but it didn't let me set a breakpoint in the Groovy code itself - which is very frustrating.

    Any recommendations for either browser are welcome. Thanks!


    SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
    Freddy Wong
    Ranch Hand

    Joined: Sep 11, 2006
    Posts: 959

    Yeah, I'm also looking for a good plugin for NetBeans. I know there's one out there, but so far it only does some simple syntax checking and some other simple stuff without any Grails support. Hopefully the NetBeans team has already had a plan to build this plugin.


    SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
    My Blog
    Balabhadruni Ramesh
    Greenhorn

    Joined: Feb 20, 2008
    Posts: 1
    Neither NetBeans nor Eclipse are not there yet as far as the Groovy support is concerned. With all the buzz around Groovy and Grails, shouldn't be long before we see very good groovy support from these IDEs
    Jorge Phillips
    Ranch Hand

    Joined: Jun 03, 2001
    Posts: 43
    Does anybody know if there is a JDE equivalent package for Emacs for Groovy/Grails?
    J Alexander
    Greenhorn

    Joined: Feb 20, 2008
    Posts: 4
    I don't use netbeans at all until it becomes a little more flexible on project layouts.

    Eclipse is my main IDE at work (we have Rational App Dev licenses, but it stinks). Groovy support in eclipse is poor. It is difficult to get the groovy plugin to pickup GSP files. There is no source formatting, completion is hit or miss but syntax highlighting does seem to work ok. I really miss the source formatting.

    I have used Idea 7 with Groovy and Grails. As Dave Klein mentioned, JetGroovy is working pretty well in the current release. It's a little awkward to run the generate scripts in idea. Having a terminal handy is still really helpful.

    I found TextMate (Mac-Only) to be one of the best interfaces to work with Ruby on Rails, and there are some textmate bundles for groovy. Groovy TextMate Bundle I imagine the grails support would work similar to RoR. TextMate's appeal, from what I can tell, is that it closely ties the file system and the editor. At least it feels a little more intuitive.

    Disclaimer: my experience is based on a few weeks of trial use for Idea and TextMate. I still use a terminal with vi. If I did purchase an IDE, it would probably be Idea (I feel a little guilty for being a huge fan but not budgeting for this). Honestly, I put my fun money towards books and a good computer every few years, for now.
    Deepak Mittal
    Greenhorn

    Joined: Dec 18, 2007
    Posts: 8
    I use Eclise and Vi for all my code/text editing.

    Groovy eclipse plug-in is not that great. When editing, I am all on my own. Is anybody aware of any vi/vim based utility for groovy/grails?

    Regards,

    -Deepak
    ryan headley
    Ranch Hand

    Joined: Jun 28, 2000
    Posts: 156
    Personally I've been using gedit under linux and I'm loving it. Create some custom snippets and its a beautiful thing!

    I blogged about how to set it all up, but if you want that info, ask me...I don't want to post the URL in hear for fear of "spamming" ya'll.


    Ryan Headley<br /><a href="http://www.sudovi.com" target="_blank" rel="nofollow">http://www.sudovi.com</a>
    Pratik R Patel
    Greenhorn

    Joined: Jan 13, 2005
    Posts: 5
    I've used all three. Eclipse is my main workhorse for normal Java development and is my favorite IDE. I have a license for IDEA and was excited to use it for Grails/Groovy development - but I find it to be sluggish.
    However, I'd been playing around with Netbeans for a while as it's Javascript editor is awesome. Netbeans 6.5 includes better groovy/grails support and I've been using it for a couple of days. Earlier releases did not have a stable or usable groovy/grails plugin, but this latest version (I d/l nightly of NB6.5) shows great promise and is actually usable.
    Another poster commented that 'you don't really need all them fancy features when working with Groovy' - I can't agree more. Once we get to a certain level of proficiency with Groovy, all you really need is a good editor and a shell.
    [ July 06, 2008: Message edited by: Pratik R Patel ]
    Michael Duffy
    Ranch Hand

    Joined: Oct 15, 2005
    Posts: 163
    Originally posted by Pratik R Patel:
    I have a license for IDEA and was excited to use it for Grails/Groovy development - but I find it to be sluggish.
    [ July 06, 2008: Message edited by: Pratik R Patel ]


    I'm not sure what sluggish looks like. I'm running the Groovy/Grails plug in using IntelliJ 7.0.3 and it's anything but sluggish. The integration between Groovy, Java, Spring, and Hibernate is fantastic.

    %


    %
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: best IDEs, editors for Groovy/Grails?