Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.7-beta-1
-
Fix Version/s: 1.7-beta-1
-
Component/s: Groovy Console
-
Labels:None
-
Environment:All. Tested on WinXP
-
Patch Submitted:Yes
-
Number of attachments :
Description
The AstBrowser class has a main method with the following javadoc:
/**
* This object is a GUI for looking at the AST that Groovy generates.
*
* Usage: groovy AstBrowser [filename]
* where [filename] is an existing Groovy script.
*/
The addition of line number highlighting into the browser broke this feature.
The attached fix does the following:
- makes the command line interface work again but allowing null inputArea and rootElement
- prints stack traces if an error occurs (this is a broader issue with error reporting in Ast Browser)
- Updates the java doc to show the true usage.
This is a main method that creates a heavyweight frame... so I didn't write a unit test.
This 2nd patch also fixes the look and feel so that it is the same as the GroovyConsole when invoked from the command line.