Summary: | Refactoring context menu does not show inline action on local variables [refactoring] [inline temp] | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Tobias Widmer <tobias_widmer> | ||||
Component: | Core | Assignee: | David Audel <david_audel> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | markus.kell.r | ||||
Version: | 3.0 | ||||||
Target Milestone: | 3.1 M2 | ||||||
Hardware: | PC | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Tobias Widmer
2004-08-31 06:07:41 EDT
Please investigate. Created attachment 14281 [details]
Method Body
Moving to JDT/Core. ICompilationUnit#codeSelect(int,int) returns an ILocalVariable with an invalid parent iff the enclosing method has an array-type parameter: ... void test(int[] arg) { List list= new ArrayList(); } ... The parent of the ILocalVariable for "list" is "test(int[][]) (not open)". Note the wrong array dimension count. We only show the action if the resolved element exists, and an ILocalVariable only exists iff its parent exists. The wrong array dimension can also be observed on the java text hover. Fixed and test added ResolveTest#testArrayParameterInsideParent1() The bug was inside Util.typeSignature(). type.getParameterizedTypeName() return type name with brackets and Util.typeSignature() add also the brackets. Verified in I200409240100. |