List<SearchResult> (Page page) { SearchTaskOptions options = new SearchTaskOptions() .setStringToFind(mySearchReplaceComponent.getSearchTextComponent().getText()) .setStringToFind(mySearchReplaceComponent.getSearchTextComponent().getText()) .setCaseSensitive(myToggleCaseSensitiveAction.isSelected()) .setWholeWords(myToggleWholeWordsAction.isSelected()) .setRegularExpression(myToggleRegularExpression.isSelected()) .setSearchDirectionForward(true) .setSearchBounds(page.getPageNumber(), SearchTaskOptions.NO_LIMIT, page.getPageNumber(), SearchTaskOptions.NO_LIMIT) .setContextOneSideLength(0); if (StringUtil.isEmpty(options.stringToFind)) { return null; } RangeSearch rangeSearch = new RangeSearch( getLargeFileEditor().getFile(), getLargeFileEditor().getProject(), new RangeSearchCallback() { @Override public FileDataProviderForSearch getFileDataProviderForSearch(boolean createIfNotExists, Project project, VirtualFile virtualFile) { return fileDataProviderForSearch; } @Override public void showResultInEditor(SearchResult searchResult, Project project, VirtualFile virtualFile) { // ignore } }); rangeSearch.runNewSearch(options, fileDataProviderForSearch, false); return rangeSearch.getSearchResultsList(); }