|
Eclipse Platform Release 4.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.search.core.text.TextSearchEngine
public abstract class TextSearchEngine
A TextSearchEngine
searches the content of a workspace file resources
for matches to a given search pattern.
create()
gives access to an instance of the search engine. By default this is the default
text search engine (see createDefault()
) but extensions can offer more sophisticated
search engine implementations.
Constructor Summary | |
---|---|
TextSearchEngine()
|
Method Summary | |
---|---|
static TextSearchEngine |
create()
Creates an instance of the search engine. |
static TextSearchEngine |
createDefault()
Creates the default, built-in, text search engine that implements a brute-force search, not using any search index. |
static Pattern |
createPattern(String pattern,
boolean isCaseSensitive,
boolean isRegex)
Creates a pattern for the given search string and the given options. |
abstract IStatus |
search(IFile[] scope,
TextSearchRequestor requestor,
Pattern searchPattern,
IProgressMonitor monitor)
Uses a given search pattern to find matches in the content of workspace file resources. |
abstract IStatus |
search(TextSearchScope scope,
TextSearchRequestor requestor,
Pattern searchPattern,
IProgressMonitor monitor)
Uses a given search pattern to find matches in the content of workspace file resources. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextSearchEngine()
Method Detail |
---|
public static TextSearchEngine create()
createDefault()
),
but extensions can offer more sophisticated search engine implementations.
TextSearchEngine
.public static TextSearchEngine createDefault()
create()
.
TextSearchEngine
.public abstract IStatus search(TextSearchScope scope, TextSearchRequestor requestor, Pattern searchPattern, IProgressMonitor monitor)
requestor
- the search requestor that gets the search resultsscope
- the scope defining the resources to search insearchPattern
- The search pattern used to find matches in the file contents.monitor
- the progress monitor to use
public abstract IStatus search(IFile[] scope, TextSearchRequestor requestor, Pattern searchPattern, IProgressMonitor monitor)
requestor
- the search requestor that gets the search resultsscope
- the files to search insearchPattern
- The search pattern used to find matches in the file contents.monitor
- the progress monitor to use
public static Pattern createPattern(String pattern, boolean isCaseSensitive, boolean isRegex) throws PatternSyntaxException
pattern
- the search pattern. If isRegex
is:
false
: a string including '*' and '?' wildcards and '\' for
escaping the literals '*', '?' and '\'true
: a regex as specified by Pattern
plus "\R" denoting
a line delimiter (platform independent)isRegex
- true
if the given string follows the Pattern
including
"\R"isCaseSensitive
- Set to true
to create a case insensitive pattern
PatternSyntaxException
- if "\R" is at an illegal positionPattern
|
Eclipse Platform Release 4.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2013. All rights reserved.