Bug 5068 - search: missing method reference
Summary: search: missing method reference
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 5069 5070 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-10-18 06:31 EDT by Adam Kiezun CLA
Modified: 2002-01-11 09:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2001-10-18 06:31:42 EDT
package p;
interface I{
void k();
}
class T{
	void m(){
		class X implements I{
			public void k(){}
		};
		X x= new X();
		x.k(); /**/
	}
}

search for references to I::K - none (wrong - /*1*/ is missing)
search for declarations - 2 (ok)
search for occurrences - 3 (ok)

another case of occurrences != declarations + references
Comment 1 Adam Kiezun CLA 2001-10-18 06:32:15 EDT
204
Comment 2 Jerome Lanneluc CLA 2001-10-18 12:06:52 EDT
I cannot reproduce (neither in 204, nor in "204 + jdtcore205").
Can you?
Comment 3 Jerome Lanneluc CLA 2001-10-18 12:15:48 EDT
Actually, I can reproduce if I put the test case in a file with a name which is 
not I (eg. AQ.java)

Will investigate.
Comment 4 Jerome Lanneluc CLA 2001-10-19 04:46:35 EDT
When initialiazing the method reference pattern, the lookup environment doesn't 
find p.I, thus it returns it could not initialize it and give up.

Need to either be more tolerant (and report inaccurate matches) or parse the 
compilation unit first (which might be hard).
Comment 5 Jerome Lanneluc CLA 2001-10-19 04:47:13 EDT
*** Bug 5069 has been marked as a duplicate of this bug. ***
Comment 6 Jerome Lanneluc CLA 2001-10-19 04:47:39 EDT
*** Bug 5070 has been marked as a duplicate of this bug. ***
Comment 7 Jerome Lanneluc CLA 2001-10-26 06:47:52 EDT
Now search for all compilation units that define the declaring type of the 
method, parse them, build their binding, and collect the super type names of 
the delaring types.
Fixed in > 20011025
Comment 8 Jerome Lanneluc CLA 2001-10-26 06:48:39 EDT
Added JavaSearchTest.testMethodReference1()