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