Bug 27485 - SearchEngine returns wrong java element when searching in an archive that is included by two distinct java projects.
Summary: SearchEngine returns wrong java element when searching in an archive that is ...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-02 06:18 EST by Adriana Nitescu CLA
Modified: 2003-03-05 05:56 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 Adriana Nitescu CLA 2002-12-02 06:18:23 EST
I have two projects "first" and "second" having both in the classpath the 
default JRE_LIB (..\eclipse\jre\lib\rt.jar). This is the only classpath entry.

The projects are not dependent on each other.

When I search in the scope of the project "second" for the class 
"java.lang.Object" the search engine returns the java element contained in the 
archive of the project "first". 
Is this a normal behavior ? 

I expect the result to be the element contained in the archive of the 
project "second" (when I search in "second" project's scope) and both elements 
when I search in workspace scope.

I have the same result if the first project is closed or opened.
Comment 1 Philipe Mulet CLA 2002-12-06 05:37:43 EST
External JAR children elements are shared. However, the search result handles 
are supposed to be rooted properly.
Comment 2 Jerome Lanneluc CLA 2003-01-14 09:11:29 EST
Now using the scope as a hint for the creation of the handle.
Added regression test JavaSearchTests.testTypeDeclarationInJar3()
Comment 3 David Audel CLA 2003-02-07 10:03:02 EST
Verified.
Comment 4 Jerome Lanneluc CLA 2003-03-05 05:56:22 EST
Moved test to JavaSearchMultipleProjectsTests.testTypeDeclarationInJar()