void () { lblSearchStatusLeft.clear(); long pagesAmount = -1; FileDataProviderForSearch fileDataProviderForSearch = myRangeSearchCallback.getFileDataProviderForSearch(false, myProject, myVirtualFile); if (fileDataProviderForSearch != null) { try { pagesAmount = fileDataProviderForSearch.getPagesAmount(); } catch (IOException e) { logger.warn(e); } } String newStatus; if (pagesAmount == -1 || myRightBorderPageNumber == UNDEFINED || myLeftBorderPageNumber == UNDEFINED) { newStatus = EditorBundle.message("large.file.editor.message.found.some.matches", getAmountOfStoredSearchResults()); } else { if (myLeftBorderPageNumber == 0 && myRightBorderPageNumber == pagesAmount - 1) { newStatus = EditorBundle.message("large.file.editor.message.found.some.matches.in.the.whole.file", getAmountOfStoredSearchResults()); } else { newStatus = EditorBundle .message("large.file.editor.message.found.some.matches.in.some.bounds.of.file", getAmountOfStoredSearchResults(), Utils.calculatePagePositionPercent(myLeftBorderPageNumber, pagesAmount), Utils.calculatePagePositionPercent(myRightBorderPageNumber, pagesAmount)); } } lblSearchStatusLeft.append(newStatus); }