void (@NotNull AnActionEvent e) { Set<ConfigurationType> types = getTargetTypes(e); boolean isEnabled = e.getProject() != null && !types.isEmpty(); Presentation presentation = e.getPresentation(); presentation.setEnabledAndVisible(isEnabled); if (isEnabled) { presentation.setText(ExecutionBundle.messagePointer("run.dashboard.remove.run.configuration.type.action.name", types.size())); } }