private static void registerNonUndoableAction(@NotNull UndoManagerImpl undoManager, @NotNull Document document) {
    DocumentReference ref = DocumentReferenceManager.getInstance().create(document);
    undoManager.nonundoableActionPerformed(ref, false);
  }
private static void registerNonUndoableAction(@NotNull UndoManagerImpl undoManager, @NotNull Document document)