Community
Participate
Working Groups
Build Identifier: 20110916-0149 Search for reference (Ctrl-Shift-G) does not work on injected method with parameter. (It is okay if I remove all parameters) Reproducible: Always Steps to Reproduce: 1. Create a project with following files: public class Test { } public aspect TestAspect { public void Test.caller(Test t) { t.method(null); } public void Test.method(String arg1) { } } 2. Select "Test.method(String arg1)", right-click -> "Reference" -> "Workspace" 3. Expected: found the reference in Test.caller, Actual Result: nothing found; P.S. If you change "Test.method(String arg1)" to "Test.method()", everything works.
I have been able to reproduce.
Turns out there were two problems here and neither having to do with searching exactly. Rather, the problem is that in the case you show, an incorrect element was chosen for searching. And because the correct element was not selected for a search, the search failed to find any references. I have a fix in my workspace, but it needs some unit tests before I can commit.
Committed the fix with regression tests. Resolving.
*** Bug 366470 has been marked as a duplicate of this bug. ***