Summary: | [assist] Content assist uses generic parameter name arg0 instead of real name | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> | ||||||||
Component: | Core | Assignee: | David Audel <david_audel> | ||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||
Severity: | normal | ||||||||||
Priority: | P3 | CC: | daniel_megert, dirk_baeumer, jerome_lanneluc, teicher-bugzilla | ||||||||
Version: | 3.1 | ||||||||||
Target Milestone: | 3.1 RC4 | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows XP | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
Markus Keller
2005-06-14 12:40:03 EDT
Tom, please investigate. We call CompletionProposal.getParameterNames() which fails to retrieve the names. Debugging it reveals that a JME is thrown at InternalCompletionProposal.findMethodParameterNames (R1.5: line 193) because the constructed method does not exist. Moving to core InternalCompletionProposal.findMethodParameterNames() try to find parameter names inside the Java Model. But findMethodParameterNames() create this method handle 'addAll(Collection)' instead of 'addAll(Collection<? extends E>)'. Created attachment 23604 [details]
Proposed patch
This fix should be correct but has not been tested
*** Bug 100982 has been marked as a duplicate of this bug. *** bug 100982 is not a duplicate Providing testing is successful, we may want to candidate it for RC4 since not having it means basically argument names are always arg0...argN when dealing with generics. Dirk/Dani - pls cast your vote Jerome - pls review the change Created attachment 23635 [details]
Proposed patch
Better patch
(In reply to comment #10) > Created an attachment (id=23635) [edit] > Proposed patch > > Better patch Reviewed patch. It looks good. +1 for 3.1 RC4. +1 for RC4. Created attachment 23653 [details]
Proposed patch
More secure patch
Add propection for invalid signature
Keep the old way to compute the fully qualified declaration type name (tName)
Yes, this patch is safer. Just a little typo: createDefaultParamterNames(int) should be createDefaultParameterNames(int) Patch released and test added CompletionTests_1_5#test0244() Typo corrected Verified for Build id: I20050624-0010. Verified. |