void (@NotNull UndoManagerImpl undoManager, @NotNull Document document, @NotNull DocumentEvent e) { if (undoManager.isActive() && isUndoable(undoManager, document)) { registerUndoableAction(undoManager, e); } else { registerNonUndoableAction(undoManager, document); } }