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