void (@NotNull AnActionEvent e) { Presentation presentation = e.getPresentation(); boolean canShow = isAvailable(e); presentation.setEnabled(canShow); if (ActionPlaces.isPopupPlace(e.getPlace())) { presentation.setVisible(canShow); } }