Bug 10955

Summary: DCR - search: too limiting api of IJavaSearchScope
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Adam Kiezun CLA 2002-03-07 10:45:13 EST
currently, it only has a 

public boolean encloses(IResource element);

method, which makes it somewhat difficult to use.

if i add only 1 file to the scope and pass the scope to somebody else
they have no efficient way to retrieve that information
so, in order to do sth in that scope, they have to iterate thru _all_ files and 
call the 'encloses' method.

there should be a way to get the information that was used to create the scope -
now, it's a kind of black hole'ish - you put stuff and can get it out only with 
great difficulty.
Comment 1 Adam Kiezun CLA 2002-03-07 10:49:54 EST
the description and title were bogus
it should say:

public boolean encloses(IJavaElement element);
Comment 2 Philipe Mulet CLA 2002-03-11 10:48:44 EST
We cannot augment the search scope API without breaking our 1.0 customers who 
could have implemented it.
Comment 3 Philipe Mulet CLA 2002-03-19 04:19:34 EST
Jerome - please check spec'ed comment, and close. We cannot add any new API.
Comment 4 Jerome Lanneluc CLA 2002-03-25 10:11:41 EST
Yes, spec says that clients may choose to implement this interface, so it is 
too late to add new methods to IJavaSearchScope.
Closing.