void (CloseSearchTask caller, long curPageNumber, long pagesAmount) { long time = System.currentTimeMillis(); if (time - lastProgressStatusUpdateTime > PROGRESS_STATUS_UPDATE_PERIOD || curPageNumber == 0 || curPageNumber == pagesAmount - 1) { lastProgressStatusUpdateTime = time; ApplicationManager.getApplication().invokeLater(() -> { if (!caller.isShouldStop()) { setNewStatusText(EditorBundle.message("large.file.editor.message.searching.at.some.percent.of.file", Utils.calculatePagePositionPercent(curPageNumber, pagesAmount))); } }); } }