void (boolean directionForward) { FileDataProviderForSearch fileDataProviderForSearch = myRangeSearchCallback.getFileDataProviderForSearch(true, myProject, myVirtualFile); if (fileDataProviderForSearch == null) { logger.warn("Can't open Large File Editor for target file."); Messages.showWarningDialog(EditorBundle.message("large.file.editor.message.cant.open.large.file.editor.for.target.file"), CommonBundle.getErrorTitle()); return; } SearchTaskOptions newOptions; try { newOptions = lastExecutedRangeSearchTask.getOptions().clone(); } catch (CloneNotSupportedException e) { logger.warn(e); Messages.showWarningDialog(EditorBundle.message("large.file.editor.cant.launch.searching.because.of.unexpected.error"), CommonBundle.getErrorTitle()); return; } newOptions.setCriticalAmountOfSearchResults( myResultsListModel.getSize() + SearchTaskOptions.DEFAULT_CRITICAL_AMOUNT_OF_SEARCH_RESULTS); if (directionForward) { newOptions .setSearchDirectionForward(true) .setSearchBounds(myRightBorderPageNumber + 1, SearchTaskOptions.NO_LIMIT, SearchTaskOptions.NO_LIMIT, SearchTaskOptions.NO_LIMIT); } else { newOptions .setSearchDirectionForward(false) .setSearchBounds(SearchTaskOptions.NO_LIMIT, SearchTaskOptions.NO_LIMIT, myLeftBorderPageNumber - 1, SearchTaskOptions.NO_LIMIT); } runSearchTask(newOptions, fileDataProviderForSearch); }