Community
Participate
Working Groups
I20050610-1757 (3.1RC2) class MyArrayList extends ArrayList<Integer> { void m() { adda //<-- (1) content assist proposes // addAll(Collection<? extends Integer> arg0) } // <-- (2) content assist proposes add(int arg0, Integer arg1) } - normal code completion like in (1) shows arg0 in the proposal label and also inserts it into the code when parameter guessing is enabled - content assist for method overriding like in (2) shows arg0 in the proposal label, but inserts correct method stubs (with 'index' and 'element', etc.).
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.