void (@NotNull AnActionEvent e) { DataContext dataContext = e.getDataContext(); Project project = e.getProject(); if (project == null) return; int eventCount = IdeEventQueue.getInstance().getEventCount(); if (!PsiDocumentManager.getInstance(project).commitAllDocumentsUnderProgress()) { return; } RefactoringActionHandler handler; try { handler = getHandler(dataContext); } catch (ProcessCanceledException ignored) { return; } IdeEventQueue.getInstance().setEventCount(eventCount); performRefactoringAction(project, dataContext, handler); }