@Override
  public void update(@NotNull AnActionEvent e) {
    final PsiClass target = getComponentInContext(e.getDataContext());

    final Presentation presentation = e.getPresentation();
    presentation.setEnabledAndVisible(target != null);
  }
@Override
  public void update(@NotNull AnActionEvent e)