Interface FindReplaceSupport
@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public interface FindReplaceSupport
Support object for the Find/Replace related actions.
- Since:
- 16.1
-
Method Summary
Modifier and TypeMethodDescriptiongetSearchHighlightsProvider
(String searchFor) getSearchHighlightsProvider
(String searchFor, boolean matchCase, boolean wholeWords) Returns the highlights of the occurrences of the current string.getSearchHighlightsProvider
(String searchFor, WebappFindOptions options) Returns the highlights of the occurrences of the current string.void
Replace the occurrence found between the specified offsets.void
replaceAll
(String textToFind, String textToReplaceWith) Replaces all the occurrences of some text with another.void
replaceAll
(String textToFind, String textToReplaceWith, WebappFindOptions options) Replaces all the occurrences of some text with another.
-
Method Details
-
getSearchHighlightsProvider
AuthorHighlighter getSearchHighlightsProvider(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
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
Replaces all the occurrences of some text with another.- Parameters:
textToFind
- The text to search for.textToReplaceWith
- The text to replace with.
-
replaceAll
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
Replace the occurrence found between the specified offsets.- Parameters:
selectionOffsets
- The offsets.textToReplaceWith
- The replacement text.
-
getSearchHighlightsProvider
- Parameters:
searchFor
- The string to search for.- Returns:
- The highlights of the occurrences of the current string.
-