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.ui.text
Class FileTextSearchScope


java.lang.Object
  extended by 

org.eclipse.search.core.text.TextSearchScope
      extended by 
org.eclipse.search.ui.text.FileTextSearchScope

public final class FileTextSearchScope
extends TextSearchScope

A text search scope used by the file search dialog. Additionally to roots it allows to define file name patterns and exclude all derived resources.

Clients should not instantiate or subclass this class.

Since:
3.2
Restriction:
This class is not intended to be instantiated by clients.

Method Summary
 boolean contains ( IResourceProxy proxy)
          Returns if a given resource is part of the scope.
  IContentType[] getContentTypes ()
          Returns the content types configured for this scope or null to match all content types.
  String getDescription ()
          Returns the description of the scope
  String[] getFileNamePatterns ()
          Returns the file name pattern configured for this scope or null to match all file names.
  String getFilterDescription ()
          Returns a description describing the file name patterns and content types.
  IResource[] getRoots ()
          Returns the resources that form the root.
  IWorkingSet[] getWorkingSets ()
          Returns the working-sets that were used to configure this scope or null if the scope was not created off working sets.
 boolean includeDerived ()
          Returns whether derived resources are included in this search scope.
static  FileTextSearchScope newSearchScope ( IResource[] roots, String[] fileNamePatterns, boolean includeDerived)
          Returns a scope for the given root resources.
static  FileTextSearchScope newSearchScope ( IWorkingSet[] workingSets, String[] fileNamePatterns, boolean includeDerived)
          Returns a scope for the given working sets.
static  FileTextSearchScope newWorkspaceScope ( String[] fileNamePatterns, boolean includeDerived)
          Returns a scope for the workspace.
 
Methods inherited from class org.eclipse.search.core.text. TextSearchScope
evaluateFilesInScope, newSearchScope
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newWorkspaceScope

public static 
FileTextSearchScope newWorkspaceScope(
String[] fileNamePatterns,
                                                    boolean includeDerived)
Returns a scope for the workspace. The created scope contains all resources in the workspace that match the given file name patterns. Depending on includeDerived, derived resources or resources inside a derived container are part of the scope or not.

Parameters:
fileNamePatterns - file name pattern that all files have to match null to include all file names.
includeDerived - defines if derived files and files inside derived containers are included in the scope.
Returns:
a scope containing all files in the workspace that match the given file name patterns.

newSearchScope

public static 
FileTextSearchScope newSearchScope(
IResource[] roots,
                                                 
String[] fileNamePatterns,
                                                 boolean includeDerived)
Returns a scope for the given root resources. The created scope contains all root resources and their children that match the given file name patterns. Depending on includeDerived, derived resources or resources inside a derived container are part of the scope or not.

Parameters:
roots - the roots resources defining the scope.
fileNamePatterns - file name pattern that all files have to match null to include all file names.
includeDerived - defines if derived files and files inside derived containers are included in the scope.
Returns:
a scope containing the resources and its children if they match the given file name patterns.

newSearchScope

public static 
FileTextSearchScope newSearchScope(
IWorkingSet[] workingSets,
                                                 
String[] fileNamePatterns,
                                                 boolean includeDerived)
Returns a scope for the given working sets. The created scope contains all resources in the working sets that match the given file name patterns. Depending on includeDerived, derived resources or resources inside a derived container are part of the scope or not.

Parameters:
workingSets - the working sets defining the scope.
fileNamePatterns - file name pattern that all files have to match null to include all file names.
includeDerived - defines if derived files and files inside derived containers are included in the scope.
Returns:
a scope containing the resources in the working set if they match the given file name patterns.

getDescription

public 
String getDescription()
Returns the description of the scope

Returns:
the description of the scope

getFileNamePatterns

public 
String[] getFileNamePatterns()
Returns the file name pattern configured for this scope or null to match all file names.

Returns:
the file name pattern starings

getWorkingSets

public 
IWorkingSet[] getWorkingSets()
Returns the working-sets that were used to configure this scope or null if the scope was not created off working sets.

Returns:
the working-sets the scope is based on.

getContentTypes

public 
IContentType[] getContentTypes()
Returns the content types configured for this scope or null to match all content types.

Returns:
the file name pattern starings

getFilterDescription

public 
String getFilterDescription()
Returns a description describing the file name patterns and content types.

Returns:
the description of the scope

includeDerived

public boolean includeDerived()
Returns whether derived resources are included in this search scope.

Returns:
whether derived resources are included in this search scope.

getRoots

public 
IResource[] getRoots()
Description copied from class: TextSearchScope
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 TextSearchScope.contains(IResourceProxy).

Overrides:
getRoots in class TextSearchScope
Returns:
returns the set of root resources. The default behavior is to return the workspace root.

contains

public boolean contains(
IResourceProxy proxy)
Description copied from class: TextSearchScope
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.

Specified by:
contains in class TextSearchScope
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.

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