Bug 68555

Summary: SearchEngine errors when package and class named the same
Product: [Eclipse Project] JDT Reporter: Kevin Schmidt <kschmid>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann
Version: 2.1.2   
Target Milestone: 3.1 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kevin Schmidt CLA 2004-06-24 19:17:18 EDT
When you have a class inside a package, both with the same name.  For example
package foo and class foo, and you use the search engine to find references to
the class foo, in some instances it will return the offsets of the package. 
Speicifically where ever the string foo.foo appears it reports the offset of the
first foo.  For a demonstration of this create a package and class foo, then
import this in another class in a different package.  Then use the
refactor->rename tool on the foo class.  Look at your import statement and you
will see that it is updated wrong.

Kevin
Comment 1 Kent Johnson CLA 2004-09-07 16:31:51 EDT
Needed to change the MatchLocator to resolve the import refs since they cannot 
be resolved using Scope.getTypeOrPackage(char[][]).

Olivier: you should check the senders of Scope.getTypeOrPackage(char[][]) in 
the DOM to see they are trying to resolve import references.
Comment 2 Frederic Fusier CLA 2004-09-23 12:17:46 EDT
Verified for 3.1 M2 with build I200409230800.