@RequiresEdt
  public void onFileChanged(Page lastPage, boolean isLengthIncreased) {
    isLocalScrollBarStabilized = false;
    pagesCache.clear();

    if (isLengthIncreased) {
      runCaretAndSelectionListeningTransparentCommand(() -> {
        documentOfPagesModel.removeLastPage(dataProvider.getProject());
      });
      isAllowedToFollowTheEndOfFile = true;
    }
    else {
      runCaretAndSelectionListeningTransparentCommand(() -> {
        documentOfPagesModel.removeAllPages(dataProvider.getProject());
      });
    }

    if (lastPage != null) {
      pagesCache.add(lastPage);
    }
    update();
  }
@RequiresEdt
  public void onFileChanged(Page lastPage, boolean isLengthIncreased)