Thursday Sep 11, 2008

Notes on Converting NetBeans Grails Support to NetBeans Griffon Support

New project template that runs "griffon create-app" and automatically opens the newly created application in the IDE. The newly created application is based on the brand new Grails-based Groovy-Swing framework called Griffon:

For future reference, here's notes on how to convert Grails support to Griffon support, which I will do once Grails support has stabilized:

  1. hg clone http://hg.netbeans.org/main nb_all
  2. cd nb_all
  3. Then search in the Groovy/Grails modules for "grails.bat". (Don't search for "grails", because every class has that in it somewhere.) Once you've found the "grails.bat" references, you'll have found the classes that define what a Grails application consists of. Simply change "grails.bat" to "griffon.bat" and then look for the Unix declarations, which are right above or below the Windows declarations and also change those from "grails" to "griffon".
  4. Simply remove the "web-app-dir" setting, which is part of the definition of what a Grails application is, though doing this may break things elsewhere, so need to investigate this. (Need to be able to create an absolutely minimal download of NetBeans IDE, i.e., one that is Java SE only, plus the Griffon cluster, unlike Grails, which is part of the "Java Web & EE" cluster.)
  5. Make sure to also change the classes that handle the execution of the Groovy scripts, which redefine the above settings.
  6. Check the file-level Grails scripts, also check that the project structure is created correctly in the Projects window.
  7. Also change the Options window, where the location of "Griffon home" should be set instead of "Grails home".
  8. Look in layer.xml and bundle.properties files for strings that say "Grails" and change those to "Griffon". Do the same in the HTML descriptor for the project template.
  9. Change the Grails icon with the Griffon icon. (Probably 16x16 as well as 32x32.)
  10. Add some Griffon samples, JavaHelp for the Griffon support, and a tutorial explaining how to use it in NetBeans IDE.
  11. Set the Griffon home (on Ubuntu anyway) in "etc/environment", not in ".bashrc" (don't know why, but otherwise NetBeans IDE doesn't pick up Griffon home).
  12. ant -Dcluster.config=groovy build-nozip
  13. Then start NetBeans from "nbbuild/netbeans/bin".
  14. Then all should be as described here.

Then maybe create a site on dev.java.net, called "nbgriffonsupport.dev.java.net", probably.

About

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.

Search

Archives
« September 2008 »
SunMonTueWedThuFriSat
 
3
6
9
13
14
23
30
    
       
Today