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