private static boolean isWholeDocumentReplace(@NotNull FrozenDocument frozen, @NotNull DocumentEventImpl event) {
    return event.getInitialStartOffset() == 0 && event.getInitialOldLength() == frozen.getTextLength();
  }
private static boolean isWholeDocumentReplace(@NotNull FrozenDocument frozen, @NotNull DocumentEventImpl event)