void (RangeSearchTask caller, long curPageNumber, List<? extends SearchResult> allMatchesAtFrame) { if (caller != lastExecutedRangeSearchTask // means new search task has been already launched || caller.isShouldStop()) { return; } SearchTaskOptions options = caller.getOptions(); if (options.searchForwardDirection) { addSearchResultsIntoEnd(allMatchesAtFrame); setRightBorderPageNumber(curPageNumber); } else { addSearchResultsIntoBeginning(allMatchesAtFrame); setLeftBorderPageNumber(curPageNumber); } if (getAmountOfStoredSearchResults() > options.criticalAmountOfSearchResults) { stopSearchTaskIfItExists(); setAdditionalStatusText(EditorBundle.message("large.file.editor.message.search.stopped.because.too.many.results.were.found")); callScheduledUpdate(); } }