void (@NotNull final AnActionEvent e) { Set<PsiFile> scope = e.getUpdateSession() .compute(this, "getScope", ActionUpdateThread.EDT, () -> getSelectedScope(myRightTree)); e.getPresentation().setEnabled(getScope(scope) != null); }