Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Ctrl+Enter and Ctrl+R are both shortcut keys for "Run Script".
  • If you highight just part of the text in the input area, then Groovy runs just that text.
  • The result of a script is the the value of the last expression executed.
  • You can turn the System.out capture on and off by selecting "Capture System.out" from the "Actions" menu

...

Editing Files

You can open any text file, edit it, run it (as a Groovy Script) and then save it again when you are finished.

...

The Groovy Swing console will execute that script on startup, injecting a transforms list in the binding of the script, so that you can add your own script results representations. In our case, we transform the Map into a nice-looking Swing JTable. And we're now able to visualize maps in a friendly and attractive fashion, as the screenshot below shows:


 

AST browser

In Groovy 1.7 (not yet released), it'll be possible to Groovy Console can visualize the AST (Abstract Syntax Tree) representing the currently edited script, as shown by the screenshot below. This is particularly handy when you want to develop AST transformations.

...