void (@NotNull AnActionEvent e) { DataContext dataContext = e.getDataContext(); FileEditor editor = PlatformCoreDataKeys.FILE_EDITOR.getData(dataContext); UndoManager undoManager = getUndoManager(editor, dataContext, true); myActionInProgress = true; try { perform(editor, undoManager); } finally { myActionInProgress = false; } }