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