Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.search.core.text
Class TextSearchScope


java.lang.Object
  extended by 
org.eclipse.search.core.text.TextSearchScope
Direct Known Subclasses:
FileTextSearchScope

public abstract class TextSearchScope
extends Object

A TextSearchScope defines 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.

Since:
3.2
See Also:
newSearchScope(IResource[], java.util.regex.Pattern, boolean)

Constructor Summary
TextSearchScope ()
           
 
Method Summary
abstract  boolean contains ( IResourceProxy proxy)
          Returns if a given resource is part of the scope.
  IFile[] evaluateFilesInScope ( MultiStatus status)
          Evaluates all files in this scope.
  IResource[] getRoots ()
          Returns the resources that form the root.
static  TextSearchScope newSearchScope ( IResource[] rootResources, Pattern fileNamePattern, boolean visitDerivedResources)
          Creates a scope that consists of all files that match the fileNamePattern and that either are one of the roots, or have one of the roots in their parent chain.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextSearchScope

public TextSearchScope()
Method Detail

newSearchScope

public static 
TextSearchScope newSearchScope(
IResource[] rootResources,
                                             
Pattern fileNamePattern,
                                             boolean visitDerivedResources)
Creates a scope that consists of all files that match the fileNamePattern and that either are one of the roots, or have one of the roots in their parent chain. If visitDerivedResources is not enabled, all files that are marked derived or have a derived container in their parent chain are not part of the scope.

Parameters:
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.
Returns:
a scope the search scope

getRoots

public 
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 contains(IResourceProxy).

Returns:
returns the set of root resources. The default behavior is to return the workspace root.

contains

public 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.

Parameters:
proxy - the resource proxy to test.
Returns:
returns true if a resource is part of the scope. if false is returned the resource and all its children are not part of the scope.

evaluateFilesInScope

public 
IFile[] evaluateFilesInScope(
MultiStatus status)
Evaluates all files in this scope.

Parameters:
status - a MultiStatus to collect the error status that occurred while collecting resources.
Returns:
returns the files in the scope.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire