void (@NotNull AnActionEvent event) { boolean enabled = null != myFilteringPanel.getShortcut(); Presentation presentation = event.getPresentation(); presentation.setEnabled(enabled); presentation.setIcon(enabled ? AllIcons.Actions.Cancel : EmptyIcon.ICON_16); }