Geertjan's Blog

  • March 24, 2007

Breathing Life into a Dead Coyote (Part 1)

Geertjan Wielenga
Product Manager
The Coyote project on java.net aimed at bringing, amongst others, Groovy support into NetBeans IDE. The project is dead since the release of NetBeans IDE 5.5, but there's enough useful code in there for integration with the Schliemann-related code that I've blogged about recently. In fact, with a little bit of tweaking (mainly involving the throwing out of the syntax support in Coyote), one is left with a project template and file templates for Groovy, which, when combined with most of what I blogged about over the past week, has this result:

Above, I've clicked on an entry in the Navigator and, as a result, the cursor is blinking happily in the related code in the editor. Bear in mind that one can open multiple Groovy documents, thanks to the NetBeans window system, and even undock documents, and that full functionality is available for undocked documents, as shown in the following screenshot, which shows code completion in an undocked Groovy document:

One other difference between Coyote and my code, i.e., in addition to the syntax point made above, is that Coyote assumes you've downloaded Groovy and requires you to set a path in the Options window to the Groovy installation directory, while my code bundles the JAR file that provides all the classes, so that the Options window extension isn't needed anymore. So I threw that out too. One problem with my approach is that the final size of all the modules is larger than Coyote, because I'm bundling the Groovy JAR, but I think that that inconvenience is mitigated by the ease of use (i.e., no need to download Groovy and no need to set anything in the Options window, everything just works out of the box).

I estimate I'll need about a week (bearing in mind that this is a 'weekend project') to finish the integration of the Schliemann code (and the multiview editor code, providing an embedded Groovy Console) with the 5.0 Coyote code. Then I will add my 6.0 version of Coyote to the Coyote project CVS. No point in creating a new project when the existing Coyote project provides all the infrastructure needed. After that, anyone who wants to can contribute modules to the 6.0 version of Coyote. At some point, something similar to the Matisse GUI Builder, in some form (possibly using the approach discussed in yesterday's blog entry, but more likely something a lot simpler), should also be available to Groovy.

On the Schliemann front, I need to learn how to extract information from libaries such as SwingBuilder, so that the related tokens do not need to be defined manually in the NBS file. That's needed for syntax coloring and code completion. I also need to learn more about grammar so that code folding can be added.

Join the discussion

Comments ( 9 )
  • Joerg Plewe Saturday, March 24, 2007
    That's good news! Coyote with Groovy is a thing thats really missing for Groovy development.
    Thank you very much for your effort!
  • Ramon Saturday, March 24, 2007
    Hi Geertjan, good work!
    We need to keep in mind that people also want to use groovy mixed with Java code. So they may need something like an Java Project enriched with groovy.
    As I understand it, a Coyote project is a script project only.
    I think the main use case of groovy may be combining Java and Groovy, as some people on the groovy mailing list were using it.
  • Joerg Plewe Saturday, March 24, 2007
    Even for Java/Groovy mixes, having distinct projects might be advantageous. Otherwise it can be diffult specifying compile order. Very often Java has to be compiled first (Groovy classes inheriting from Java). But the other way round is also possible. Project dependencies are a good mean to model that.

    But of course Groovy scripts should be editable as part of Java project when evaluated at runtime.
  • Theo Brenner Saturday, March 24, 2007
    awesome stuff. could this be combined with Matisse ?
    I mean would it be possible that Matisse could generate Groovy Swingbuilder code ? this combined
    with your work would be a real competitor for VB and the Delphi stuff.
  • Stefan Sunday, March 25, 2007
    Great news, I'm looking forward to be able to code Groovy in Netbeans. The GroovyEclipse plugin is the only one reason why I still have Eclipse installed.
    Do you also plan to add debugger support?
  • Michael Nischt Monday, March 26, 2007
    Following the Schliemann-related posts, I more and more want to get my hands on using it, great work!

    I'd love to get more experienced with few of the new JVM languages, but I'm to lazy without a good netbeans integration.. -> go, Schliemann, go

    So far it looks like I'd prefer grovvy for most scripting stuff and therefore I'm very happy about the project. Otherwise I'll probably go for (J)Ruby because of the NB integration. -> can't wait for Coyote's Resurrection

    Another language, I'd love to give a try for general development (yes, instead of Java, not only in addition) would be scala. Felt like discovering the hidden gold of troy, when I first read the comparison :-)
  • 礼仪公司 Monday, April 30, 2007
  • Mike Anderson Wednesday, July 25, 2007
  • Mike Anderson Wednesday, July 25, 2007
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.