void (@NotNull AnAction action, @NotNull DataContext dataContext) { ApplicationManager.getApplication().invokeLater( () -> IdeFocusManager.getInstance(RunAnythingUtil.fetchProject(dataContext)).doWhenFocusSettlesDown( () -> performAction(action, dataContext), ModalityState.current())); }