2.4 Getting Set-up in an IDE - Reference Documentation
Authors: Andres Almiray
Version: 1.2.0
2.4 Getting Set-up in an IDE
IntelliJ IDEA
IntelliJ IDEA and the JetGroovy plug-in offer good support for Groovy/Grails/Griffon developers. Refer to the section on Groovy and Grails support on the JetBrains website for a feature overview.Integrating an existing Griffon project
IntelliJ 10 and newer supports Griffon form the get go. You can open existing projects as well as create new ones. However you can also create the required IntelliJ project files by running the following command:griffon integrate-with --intellij
Creating a new Griffon project
Follow these steps to create and run a new Griffon project with IDEA#1 Bring up the "New Project" wizard. You should see Griffon as one of the available options



NetBeans
A good Open Source alternative is Oracle's NetBeans, which provides a Groovy/Griffon plugin that automatically recognizes Griffon projects and provides the ability to run Griffon applications in the IDE, code completion and integration with Oracle's Glassfish server.Integrating an existing Griffon project
NetBeans does not require any special integration support, it understands the layout of a Griffon project as long as the Griffon plugin is installed. Just select "Open" from the menu and locate the folder that contains your project. It's that simple. Follow these steps to install the Griffon NetBeans plugin.Prerequisites: Java, Groovy and Grails plugins installed and up to date.#1 Download the pluginFollow this link to download the latest zip distribution of the plugin.#2 Unpack the zip file into a directory of your choosing#3 Open the plugin manager dialog. Go to the "Downloaded" tab, then click on the "Add Plugins..." button. Locate and select the NBM files that were uncompressed in the previous step.#4 Select both plugins (using the checkboxes) and click on "Install".
Creating a new Griffon project
Prerequisites: You must have the Griffon plugin installed. Follow the steps explained in the previous section to get the job done.#1 Bring up the "New Project" wizard. Click on "Groovy" then on "Griffon Application".



Eclipse
We recommend that users of Eclipse looking to develop Griffon application take a look at SpringSource Tool Suite, which offers built in support for Groovy.Integrating an existing Griffon project
To integrate Griffon with Eclipse run the following command to generate appropriate project files:griffon integrate-with --eclipse
griffon install-plugin eclipse-support




Running Griffon commands within Eclipse
We'll rely on Eclipse's Ant support to get the job done, but first we need to generate an Ant build filegriffon integrate-with --ant

TextMate
Since Griffon' focus is on simplicity it is often possible to utilize more simple editors and TextMate on the Mac has an excellent Groovy/Griffon bundle available.Follow these steps to install the Groovy bundle#1 Create a local bundle directory
mkdir ~/Library/Application Support/TextMate/Bundles/
#2a If you have git installed then just clone the repository
cd ~/Library/Application Support/TextMate/Bundles/
git clone https://github.com/textmate/groovy.tmbundle.git
#2b Alternatively download a copy of the latest version from github as a zip and unpack it. Rename the unpacked directory to groovy.tmbundle
.Follow these steps to install the Griffon bundle#1 Create a local bundle directory
mkdir ~/Library/Application Support/TextMate/Bundles/
#2a If you have git installed then just clone the repository
cd ~/Library/Application Support/TextMate/Bundles/
git clone https://github.com/griffon/griffon.tmbundle.git
#2b Alternatively download a copy of the latest version from github as a zip and unpack it. Rename the unpacked directory to griffon.tmbundle
.Now configure the PATH
environment variable within TextMate. Make sure that $GRIFFON_HOME/bin
in expanded form is set
Integrating an existing Griffon project
To integrate Griffon with TextMate run the following command to generate appropriate project files:griffon integrate-with --textmate
mate .

Running Griffon commands within TextMate
The Griffon bundle provides new commands under the "Bundles" menu. Search for the "Griffon submenu".

Sublime Text 2
To integrate Griffon with Sublime Text 2 run the following command to generate appropriate project files:griffon integrate-with --sublimetext2
Project
menu, locate the generated project file and open it. You should get a screen similar to the next one