void (long fromPageNumber, long toPageNumber, boolean forwardDirection) { SearchTaskOptions options = new SearchTaskOptions() .setStringToFind(mySearchReplaceComponent.getSearchTextComponent().getText()) .setSearchDirectionForward(forwardDirection) .setSearchBounds(fromPageNumber, SearchTaskOptions.NO_LIMIT, toPageNumber, SearchTaskOptions.NO_LIMIT) .setCaseSensitive(myToggleCaseSensitiveAction.isSelected()) .setWholeWords(myToggleWholeWordsAction.isSelected()) .setRegularExpression(myToggleRegularExpression.isSelected()) .setContextOneSideLength(CONTEXT_ONE_SIDE_LENGTH); launchNewRangeSearch(options); }