Bug 13919 - Declaration for package not found if scope is not project
Summary: Declaration for package not found if scope is not project
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-16 13:19 EDT by Dani Megert CLA
Modified: 2002-04-30 12:29 EDT (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-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.