void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(isEnabled(e.getDataContext())); boolean shouldBeHidden = ExperimentalUI.isNewUI() && e.isFromActionToolbar(); e.getPresentation().setVisible(!shouldBeHidden); }