void (@NotNull AnActionEvent e) { final boolean enabled = isEnabled(e); if (ActionPlaces.isPopupPlace(e.getPlace())) { e.getPresentation().setVisible(enabled); } else { e.getPresentation().setEnabled(enabled); } }