void (@NotNull AnActionEvent e) { List<RunDashboardRunConfigurationNode> nodes = RunDashboardActionUtils.getTargets(e); boolean enabled = e.getProject() != null && !nodes.isEmpty(); Presentation presentation = e.getPresentation(); presentation.setEnabledAndVisible(enabled); if (enabled) { presentation.setText(ExecutionBundle.message("run.dashboard.hide.configuration.action.name", nodes.size())); } }