Bug 25539

Summary: Unexpected inaccurate search results
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 M3   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Philipe Mulet CLA 2002-10-30 09:31:51 EST
Build 20021029

When searching for references to Throwable (type references), I got back 
inaccurate matches, such as:

org.eclipse.jdt.core.tests.compiler.parser.SingleCompletionTest.run(Class, 
String)

org.eclipse.core.runtime.IStatus.getException()

(got 51 inaccurate matches in total)
Comment 1 Philipe Mulet CLA 2002-10-30 11:29:17 EST
Forgot to mention the search was not case sensitive.
Comment 2 Jerome Lanneluc CLA 2002-10-31 10:55:53 EST
There were 2 problems:
- the pattern didn't need resolve, but since SingleNameReferences were found we 
resolved only the current unit. This caused binary types of another potential 
match to be cached in the LookupEnvironment and thus when resolving this other 
potential match, a duplicate type error was reported, and resolution aborted.
- in presence of binary types and their member types (e.g. A.class and 
A$B.class), 2 resolution were done. The second failed with a duplicate type 
error.

Fixed first problem by resolving all potential matches at once if we find out 
that resolution is needed late in the game.

Fixed second problem by remembering that a unit had already been resolved.