void (@NotNull AnActionEvent event) { boolean toEnable = getPlace(event) != null; if (ActionPlaces.isPopupPlace(event.getPlace())) { event.getPresentation().setVisible(toEnable); } else { event.getPresentation().setEnabled(toEnable); } }