Java Reference
In-Depth Information
On Windows, that spawns a separate process. On Macs and Unix flavors, the
groovyConsole command locks up that particular shell, so you might want to run it in
the background by appending an ampersand ( & ). The result looks like figure A.1 .
Figure A.1. The Groovy console, which comes with the Groovy distribution. Remember to go under the View menu
and select Auto Clear Output On Run to make the tool far more practical.
The Groovy console appends its results to the output window, which can be problematic.
Worse,ifyoutypealinethatthrowsanexception, [ 4 ] theresultwindowstopsscrolling,even
if you later fix the error. My recommendation, therefore, is to select the last entry under
the View menu, entitled Auto Clear Output On Run. That will make the console clear the
output every time you execute a script. The Groovy console includes an Abstract Syntax
Tree browser, among other things. It's useful even if you normally work with an IDE.
4 I know you would never do that, but you know what your coworkers are like. They're capable of anything.
Speaking of IDEs, the next section documents their current level of support.
A.4. IDE support
If you're an Eclipse user, the Groovy Eclipse plugin is state-of-the-art. To add it to
an existing Eclipse distribution, use the update string found on the page at ht-
 
 
Search WWH ::




Custom Search