Bug 3320 - Search - Match through super type not found if in different project (1GGAOFT)
Summary: Search - Match through super type not found if in different project (1GGAOFT)
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.0 M1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 6094 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-10-10 22:53 EDT by Jerome Lanneluc CLA
Modified: 2002-01-11 09:22 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.