Bug 9642 - Search - missing inaccurate type matches
Summary: Search - missing inaccurate type matches
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0 M4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-13 10:44 EST by Philipe Mulet CLA
Modified: 2002-02-26 11:23 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2002-02-13 10:44:50 EST
Build 20020212

In a self-hosting workspace, with project org.eclipse.core.resources closed, 
searches for references to 'org.eclipse.core.resources.IResource' using the 
Java search page.

No inaccurate match is found inside JavaSearchScope.add(IJavaElement) where 2 
should have been found (by variable declaration type simple name).
Comment 1 Philipe Mulet CLA 2002-02-13 11:07:39 EST
Simpler test case:

Define:

class X {
  {
    Zork[] zork = new Zork[0];
  }
}

Search (using Java search page) for references to type 'Zork':
It doesn't find the missing variable type.

NOTE: if searching for 'p.Zork', it finds nothing.

In both cases, I would expect 2 inacurrate matches.
Comment 2 Jerome Lanneluc CLA 2002-02-26 11:23:45 EST
In the first test case (i.e. searching for 'Zork'), the search pattern was case 
insensitive, but we used CharOperation.equals(char[], char[]) to compare the 
type ref and the simple name

In the second test case (i.e. searchin for 'p.Zork'), the problem reference 
binding was treated as a regular binding, and since it would return an empty 
qualification, we rejected it.