Interface FindReplaceSupport
-
@API(type=NOT_EXTENDABLE, src=PUBLIC) public interface FindReplaceSupport
Support object for the Find/Replace related actions.- Since:
- 16.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AuthorHighlighter
getSearchHighlightsProvider(java.lang.String searchFor)
AuthorHighlighter
getSearchHighlightsProvider(java.lang.String searchFor, boolean matchCase, boolean wholeWords)
Returns the highlights of the occurrences of the current string.AuthorHighlighter
getSearchHighlightsProvider(java.lang.String searchFor, WebappFindOptions options)
Returns the highlights of the occurrences of the current string.void
replace(int[] selectionOffsets, java.lang.String textToReplaceWith)
Replace the occurrence found between the specified offsets.void
replaceAll(java.lang.String textToFind, java.lang.String textToReplaceWith)
Replaces all the occurrences of some text with another.void
replaceAll(java.lang.String textToFind, java.lang.String textToReplaceWith, WebappFindOptions options)
Replaces all the occurrences of some text with another.
-
-
-
Method Detail
-
getSearchHighlightsProvider
AuthorHighlighter getSearchHighlightsProvider(java.lang.String searchFor, boolean matchCase, boolean wholeWords)
Returns the highlights of the occurrences of the current string.- Parameters:
searchFor
- The string to search for.matchCase
- Flag for matching case on the search string.wholeWords
- Find whole words only.- Returns:
- The highlights of the occurrences of the current string.
-
getSearchHighlightsProvider
AuthorHighlighter getSearchHighlightsProvider(java.lang.String searchFor, WebappFindOptions options)
Returns the highlights of the occurrences of the current string.- Parameters:
searchFor
- The string to search for.options
- The search options.- Returns:
- The highlights of the occurrences of the current string.
- Since:
- 19.1
-
replaceAll
void replaceAll(java.lang.String textToFind, java.lang.String textToReplaceWith)
Replaces all the occurrences of some text with another.- Parameters:
textToFind
- The text to search for.textToReplaceWith
- The text to replace with.
-
replaceAll
void replaceAll(java.lang.String textToFind, java.lang.String textToReplaceWith, WebappFindOptions options)
Replaces all the occurrences of some text with another. Also considers the options.- Parameters:
textToFind
- The text to search for.textToReplaceWith
- The text to replace with.options
- The search options.- Since:
- 19.1
-
replace
void replace(int[] selectionOffsets, java.lang.String textToReplaceWith)
Replace the occurrence found between the specified offsets.- Parameters:
selectionOffsets
- The offsets.textToReplaceWith
- The replacement text.
-
getSearchHighlightsProvider
AuthorHighlighter getSearchHighlightsProvider(java.lang.String searchFor)
- Parameters:
searchFor
- The string to search for.- Returns:
- The highlights of the occurrences of the current string.
-
-