| Summary: | [1.7] codeSelect doesn't work on @PolymorphicSignature methods | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> | ||||||
| Component: | Core | Assignee: | Satyam Kandula <satyam.kandula> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | amj87.iitr, daniel_megert, deepakazad, Olivier_Thomann, satyam.kandula, srikanth_sankaran | ||||||
| Version: | 3.7 | ||||||||
| Target Milestone: | 3.7.1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 349683 | ||||||||
| Attachments: |
|
||||||||
|
Description
Markus Keller
I'll take a look See also bug 349487 comment 4: > For references to the methods, IMethodBinding#getJavaElement() and > codeSelect(..) should return IMethods whose isResolved() is true and whose > getKey() returns the binding key of the method binding of the corresponding > MethodInvocation node. This is something we need to fix for the final release. Ayush, I need for another search bug and hence, I will look at this. (In reply to comment #2) > See also bug 349487 comment 4: > > For references to the methods, IMethodBinding#getJavaElement() and > > codeSelect(..) should return IMethods whose isResolved() is true and whose > > getKey() returns the binding key of the method binding of the corresponding > > MethodInvocation node. and to put it explicitly, codeSelect fails because it could not find the exact method, for the same reason as of 349487. > and to put it explicitly, codeSelect fails because it could not find the exact > method, for the same reason as of 349487. This bug needs an additional fix. Bug 349487 has been fixed with the patch from bug 349488. (In reply to comment #6) > > and to put it explicitly, codeSelect fails because it could not find the exact > > method, for the same reason as of 349487. > > This bug needs an additional fix. Bug 349487 has been fixed with the patch from > bug 349488. Yes, you are right. The patch is in line with the bug fix for 349487, but it doesn't fix and I am working on it. Created attachment 198402 [details] Proposed patch + tests With this patch, the selection works good except that the the javadoc doesn't show (Object ...) as parameters. This is because the binding key is not correct, whose problem is being tracked with bug 350039. (In reply to comment #8) The fix looks good, but it raises the question where else you also need to replace methodBinding.original() and funnel in the polymorphicMethod(). Maybe this should go straight into PolymorphicMethodBinding#original()? > With this patch, the selection works good except that the the javadoc doesn't > show (Object ...) as parameters. This is because the binding key is not > correct, whose problem is being tracked with bug 350039. I don't think so. The binding key looks correct to me. I think the problem is on the UI side, see bug 350087. (In reply to comment #9) > (In reply to comment #8) > The fix looks good, but it raises the question where else you also need to > replace methodBinding.original() and funnel in the polymorphicMethod(). Maybe > this should go straight into PolymorphicMethodBinding#original()? I also think, this should go into original. Olivier, is there any reason that is shouldn't? (In reply to comment #10) > I also think, this should go into original. Olivier, is there any reason that > is shouldn't? I made the modification. Please let me know how it works for you. (In reply to comment #11) > I made the modification. Please let me know how it works for you. Thanks Olivier. This fixes both this bug and bug 349683. I will release the tests. Created attachment 198622 [details]
Tests
Added tests..
(In reply to comment #13) > Created attachment 198622 [details] > Tests > > Added tests.. This got fixed by the fix for bug 349487. Released the tests in BETA_JAVA7 branch Everything looks good in BETA_JAVA7 now. |