void (@NotNull final AnActionEvent event) { Presentation presentation = event.getPresentation(); boolean hidden = isHidden(event); if (hidden) { presentation.setEnabledAndVisible(false); return; } boolean enabled = isEnabled(event); if (myHideDisabledInPopup && ActionPlaces.isPopupPlace(event.getPlace())) { presentation.setVisible(enabled); } else { presentation.setVisible(true); } presentation.setEnabled(enabled); }