void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); DataContext dataContext = event.getDataContext(); boolean enabled = isEnabled(dataContext); presentation.setVisible(enabled || !ActionPlaces.isPopupPlace(event.getPlace())); presentation.setEnabled(enabled); }