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