@Override
    public void update(@NotNull AnActionEvent e) {
      myDelegate.update(e);
      Presentation presentation = e.getPresentation();
      presentation.setEnabled(presentation.isEnabled() && shouldBeVisible(myDelegate));
      presentation.setVisible(presentation.isVisible() && shouldBeVisible(myDelegate));
    }
@Override
    public void update(@NotNull AnActionEvent e)