So , the shell not enough? Fancy a bit of IDE action ?
Well you're in the right place.
Here you will find the latest information regarding the groovy Eclipse plugin, some instructions etc...
The current version is available on CVS from what I've seen. Just check out
as project and compile/export from Eclipse.
- Check out /groovy/ide/groovy-eclipse/Groovy and /groovy/ide/groovy-eclipse/GroovyEclipse from CVS (see here http://groovy.codehaus.org/cvs-usage.html for CVS infos) into separate Eclipse projects. Just use simple check-outs, CVS already contains all the informations Eclipse needs to create the projects properly (i.e. .project and .classpath and other files)
- Select the GroovyEclipse project in the pacakge explorer view, right mouse click, and a pop-up window called Export shows up.
- In the Export pop-up, select "Deployable plug-ins and fragments", click next, then:
- In the Available Plug-ins and Fragments list, select "org.codehaus.groovy", "org.codehaus.groovy.eclipse"
- In Export Options/Deploy as, Select "as single Zip file"
- In the Destination, enter or browse for a file name
- Click on Finish, and you are done.
Install and Test
The zip file you just created is now just like any other plug-in zip file, that can be unzipped under the eclipse root directory.
To install and test the plug-in:
- Open the zip file and exxtract its content to the eclipse root directory.
You can check that two folders have been created under eclipse/plugin:
org.codehaus.groovy.eclipse_1.0.0 and org.codehaus.groovy_1.0.0
- Restart Eclipse to install the Grrovy plug-in
- For quick test of the plug-in:
- Create a new Java project, right mouse-click on the src folder, and select New/Other/Groovy/Groovy Class
- Create a new Groovy class called GTest,
- or alteranively create a new plain file and give it the name of the class you want to create plus the .groovy extension
- When prompted "Add runtime groovy support and auto-build to project?" , click Yes! (You may be prompted that question twice... always say Yes!)
- You can paste the following snippet into the GTest.groovy editor:
- In the Project Explorer, select GTest.groovy, then right mouse-click and Run/Run
- In the Run pop-up, select Groovy in the list of configurations, then click New, and click the Search button to search for the Main Class.
The GTest class should appear in the list of Groovy classes to run. Select it and clieck OK.
- Click Apply, then Run... check your console view, it should read Rod, Phil...
YOU ARE REALLY DONE! -pombredanne pombredanne
Eclipse Version compatibility
It's working for the M9+ builds although it appears that the incremental build support is still being ported.
I tested it with Eclipse 3.0 and 3.1 M1. On 3.0 I get exceptions when building, on 3.1 M1 building works fine (except that only libraries seem to be supported classpath entries, not other projects or java code in the same project's source folder). -phaze9
I tested the build from a fresh checkout on 2004-09-23 with Eclipse 3.0.1 and it worked perfectly
(I just had to comment one weird line of code in org/codehaus/groovy/eclipse/model/AddErrorMarker.java line 81 which just was : unit. ???, but then everything went fine)-pombredanne pombredanne