Bug 68555 - SearchEngine errors when package and class named the same
Summary: SearchEngine errors when package and class named the same
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-24 19:17 EDT by Kevin Schmidt CLA
Modified: 2004-09-23 12:17 EDT (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 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.