public static boolean setEnabled(@NotNull AnActionEvent e) {
    ImageComponentDecorator decorator = getImageComponentDecorator(e);
    Presentation presentation = e.getPresentation();
    presentation.setEnabled(decorator != null);
    return presentation.isEnabled();
  }
public static boolean setEnabled(@NotNull AnActionEvent e)