Bug 3320

Summary: Search - Match through super type not found if in different project (1GGAOFT)
Product: [Eclipse Project] JDT Reporter: Jerome Lanneluc <jerome_lanneluc>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: philippe_mulet
Version: 2.0   
Target Milestone: 2.0 M1   
Hardware: All   
OS: All   
Whiteboard:

Description Jerome Lanneluc CLA 2001-10-10 22:53:10 EDT
1. Create Java project P1
	2. Create package p1 in this project
	3. Add class p1.X:
[package p1;
public class X {
	public void foo() {
	}
}]
	4. Add class p1.A:
[package p1;
public class A {
	X x;
	public void bar() {
		this.x.foo();
	}
}]
	5. Create Java project P2 with P1 as a prereq
	6. Create package p2 in this project
	7. Create class p2.Y:
[package p2;
import p1.X;
public class Y extends X {
	public void foo() {
	}
}]
	8. Select Y.foo in the outline
	9. Search for references
	Observe: None is found where it should find one though X

NOTES:

JBL (7/3/2001 5:44:14 PM)
	Problem is that X cannot see Y, thus we fail to initialize the search pattern with the superclasses of Y.
Comment 1 DJ Houghton CLA 2001-10-29 17:09:14 EST
PRODUCT VERSION:
	SDK 0.125

Comment 2 Jerome Lanneluc CLA 2001-11-23 11:41:08 EST
*** Bug 6094 has been marked as a duplicate of this bug. ***
Comment 3 Jerome Lanneluc CLA 2001-11-23 11:55:10 EST
Fixed by implementing what was suggested in bug 6094:
- the super type names are computed before the resolution of potential matches 
happens
- if an IType is available, then it is used to find the type's supertypes in 
the context of its project
- if no IType is available (case of a search using the Java Search dialog), 
then the potential matching types are searched in the whole workspace, and for 
each of them, its supertype names are added to a single list.