Bug 13919

Summary: Declaration for package not found if scope is not project
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M6   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Dani Megert CLA 2002-04-16 13:19:06 EDT
1. Add a working set which contains a folder (e.g. junit.framework)
   ==> JavaSearchScope with IFolder junit/framework
2. Search for some classes using that working set
   ==> works
3. Search for the package declaration itself (e.g. junit.framework)
   ==> no matches.
Comment 1 Jerome Lanneluc CLA 2002-04-30 07:03:34 EDT
The scope defines the elements that enclose the search results. So do you 
consider that junit.framework encloses junit.framework?
Comment 2 Dani Megert CLA 2002-04-30 10:52:41 EDT
Yes I do and normally Java Model does apply the same rules i.e. if I add a type
to the scope this type is then found if looking for its declarations.
Comment 3 Jerome Lanneluc CLA 2002-04-30 12:29:43 EDT
You're right. Thanks for pointing this out.

Fixed JavaSearchScope.encloses(IPath) so that it accepts the case where the 
given path is equal to one of the paths of the scope's resources.