- Direct Known Subclasses:
public abstract class TextSearchScope extends Object
TextSearchScopedefines the scope of a search. The scope consists of all workbench resources that are accepted by
contains(IResourceProxy)and that either are a root element (
getRoots()) or have a root element in their parent chain.
- See Also:
Method SummaryModifier and TypeMethodDescription
abstract booleanReturns if a given resource is part of the scope.
IFileEvaluates all files in this scope.
getRoots()Returns the resources that form the root.
static TextSearchScopeCreates a scope that consists of all files that match the
fileNamePatternand that either are one of the roots, or have one of the roots in their parent chain.
newSearchScopepublic static TextSearchScope newSearchScope
(IResource rootResources, Pattern fileNamePattern, boolean visitDerivedResources)Creates a scope that consists of all files that match the
fileNamePatternand that either are one of the roots, or have one of the roots in their parent chain. If
visitDerivedResourcesis not enabled, all files that are marked derived or have a derived container in their parent chain are not part of the scope.
rootResources- the resources that are the roots of the scope
fileNamePattern- file name pattern for this scope.
visitDerivedResources- if set also derived folders and files are searched.
- a scope the search scope
getRootspublic IResource getRoots()Returns the resources that form the root. Roots can not contain each other. Root elements are only part of the scope if they are also accepted by
- returns the set of root resources. The default behavior is to return the workspace root.
containspublic abstract boolean contains
(IResourceProxy proxy)Returns if a given resource is part of the scope. If a container is not part of the scope, also all its members are not part of the scope.
proxy- the resource proxy to test.
trueif a resource is part of the scope. if
falseis returned the resource and all its children are not part of the scope.
evaluateFilesInScopeEvaluates all files in this scope.
MultiStatusto collect the error status that occurred while collecting resources.
- returns the files in the scope.