Bug 361876 - Search for reference on Injected method with parameter
Summary: Search for reference on Injected method with parameter
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 2.1.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.2.0   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 366470 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-24 22:07 EDT by CHENG Yuk Pong CLA
Modified: 2011-12-12 19:43 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description CHENG Yuk Pong CLA 2011-10-24 22:07:56 EDT
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.
Comment 1 Andrew Eisenberg CLA 2011-10-25 08:36:02 EDT
I have been able to reproduce.
Comment 2 Andrew Eisenberg CLA 2011-11-07 19:40:50 EST
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.
Comment 3 Andrew Eisenberg CLA 2011-11-08 13:00:38 EST
Committed the fix with regression tests.  Resolving.
Comment 4 Andrew Eisenberg CLA 2011-12-12 19:43:22 EST
*** Bug 366470 has been marked as a duplicate of this bug. ***