public interface IFindReplaceTargetExtension3
IFindReplaceTarget
.
Extends the find replace target's findAndSelect
and
replaceSelection
methods to allow and be aware of regular
expression find/replace.
Modifier and Type | Method and Description |
---|---|
int |
findAndSelect(int offset,
String findString,
boolean searchForward,
boolean caseSensitive,
boolean wholeWord,
boolean regExSearch)
Searches for a string starting at the given offset and using the specified search
directives.
|
void |
replaceSelection(String text,
boolean regExReplace)
Replaces the currently selected range of characters with the given text.
|
int findAndSelect(int offset, String findString, boolean searchForward, boolean caseSensitive, boolean wholeWord, boolean regExSearch)
true
the findString is
interpreted as a regular expression.offset
- the offset at which searching startsfindString
- the specification of what should be foundsearchForward
- true
searches forward, false
backwardscaseSensitive
- true
performs a case sensitive search, false
an insensitive searchwholeWord
- if true
only occurrences are reported in which the findString stands as a word by itself.
Must not be used in combination with regExSearch
.regExSearch
- if true
findString represents a regular expression
Must not be used in combination with wholeWord
.PatternSyntaxException
- if regExSearch is true
and findString is an invalid regular expressionvoid replaceSelection(String text, boolean regExReplace)
true
the text is interpreted as a
regular expression that is used to process the selected text in order to
produce the actual replacement of the selected text.
This target must be editable. Otherwise nothing happens.
text
- the specification of the substitution textregExReplace
- if true
text represents a regular
expressionIllegalStateException
- in case of regular expressions, this call
is not preceded by a call to findAndSelect
PatternSyntaxException
- if regExReplace is
true
and text is an invalid regular expression
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.