Bug 10213 - SearchEngine.createJavaSearchScope((IJavaElement[]) does not work for binary elements
Summary: SearchEngine.createJavaSearchScope((IJavaElement[]) does not work for binary ...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows NT
: P3 major (vote)
Target Milestone: 2.0 M4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-25 16:23 EST by Dani Megert CLA
Modified: 2002-03-11 12:26 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 Dani Megert CLA 2002-02-25 16:23:11 EST
Build 20020224

The scope is internally based on resources and hence binary elements from
external JARs cause problems (and I guess also from internal JARs).

The API does not specify this restriction.
Comment 1 Jerome Lanneluc CLA 2002-03-11 05:03:46 EST
Java search scope are internally based on paths. For a file in a jar (external 
or internal), this path is the path to the jar plus the path inside the jar to 
the file.

I created a search scope on a package p in an external jar. I then searched for 
the type declarations in this scope and it gave me only the type declarations 
in package p.

Do you have a test case where this would fail?
Comment 2 Dani Megert CLA 2002-03-11 10:07:48 EST
1. Select a binary package which contains a class (e.g. "T") or select "T"
   (I tested with javax.swing.AbstractButton)
2. Open Search dialog
3. Enter the name "T", search for Type Declarations
4. Check scope: "Selected Resources"==> no matches.

Comment 3 Jerome Lanneluc CLA 2002-03-11 12:26:14 EST
Indeed that was a bug for class file elements in external jars. The underlying 
resource was used to determine the path.
Fixed.