groovy

GroovyConsole AST Viewer does not display Parameter type fields of MethodNode entries

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7-beta-1
  • Fix Version/s: 1.7-beta-1
  • Component/s: Groovy Console
  • Labels:
    None
  • Environment:
    WinXP, Groovy Trunk
  • Number of attachments :
    1

Description

GroovyConsole AST Viewer does not display Parameter type fields of MethodNode entries. The parameter toString() shows up in the table but not in the tree view. This is a little useless. In practice, you need to look at the parameters and their values.

You can reproduce the defect with:

public String myMethod(String parameter = null) {
'some result'
}

Activity

Hide
Hamlet D'Arcy added a comment -

The Parameter fields of a ClosureExpression are not displayed either.

A patch is coming in a matter of minutes.

Show
Hamlet D'Arcy added a comment - The Parameter fields of a ClosureExpression are not displayed either. A patch is coming in a matter of minutes.
Hide
Hamlet D'Arcy added a comment -

A patch and unit test are attached.

The fix is pretty obvious. Parameter types needed to be added to the tree.

I ran the test with:
ant test -DtestCase=groovy.inspect.swingui.ScriptToTreeNodeAdapterTest

and it passed.

Should be 4 new test methods.

Show
Hamlet D'Arcy added a comment - A patch and unit test are attached. The fix is pretty obvious. Parameter types needed to be added to the tree. I ran the test with: ant test -DtestCase=groovy.inspect.swingui.ScriptToTreeNodeAdapterTest and it passed. Should be 4 new test methods.
Hide
Hamlet D'Arcy added a comment -

GroovyConsole's AST Browser now displays Parameter nodes in the UI. Previously they were simply missing.

Show
Hamlet D'Arcy added a comment - GroovyConsole's AST Browser now displays Parameter nodes in the UI. Previously they were simply missing.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
1h
Original Estimate - 1 hour
Remaining:
1h
Remaining Estimate - 1 hour
Logged:
Not Specified
Time Spent - Not Specified