public interface IFindReplaceTargetExtension3
Extends the find replace target's
replaceSelection methods to allow and be aware of regular
|Modifier and Type||Method and Description|
Searches for a string starting at the given offset and using the specified search directives.
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)
truethe findString is interpreted as a regular expression.
offset- the offset at which searching starts
findString- the specification of what should be found
trueperforms a case sensitive search,
falsean insensitive search
trueonly occurrences are reported in which the findString stands as a word by itself. Must not be used in combination with
truefindString represents a regular expression Must not be used in combination with
PatternSyntaxException- if regExSearch is
trueand findString is an invalid regular expression
void replaceSelection(String text, boolean regExReplace)
truethe 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 text
truetext represents a regular expression
IllegalStateException- in case of regular expressions, this call is not preceded by a call to
PatternSyntaxException- if regExReplace is
trueand text is an invalid regular expression
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.