use of com.intellij.execution.dashboard.RunDashboardContributor in project intellij-community by JetBrains.
the class RunConfigurationNode method update.
@Override
protected void update(PresentationData presentation) {
RunnerAndConfigurationSettings configurationSettings = getConfigurationSettings();
boolean isStored = RunManager.getInstance(getProject()).getAllConfigurationsList().contains(configurationSettings.getConfiguration());
presentation.addText(configurationSettings.getName(), isStored ? SimpleTextAttributes.REGULAR_ATTRIBUTES : SimpleTextAttributes.GRAY_ATTRIBUTES);
RunDashboardContributor contributor = RunDashboardContributor.getContributor(configurationSettings.getType());
Icon icon = null;
if (contributor != null) {
DashboardRunConfigurationStatus status = contributor.getStatus(this);
if (DashboardRunConfigurationStatus.STARTED.equals(status)) {
icon = getExecutorIcon();
} else if (DashboardRunConfigurationStatus.FAILED.equals(status)) {
icon = status.getIcon();
}
}
if (icon == null) {
icon = RunManagerEx.getInstanceEx(getProject()).getConfigurationIcon(configurationSettings);
}
presentation.setIcon(isStored ? icon : IconLoader.getDisabledIcon(icon));
if (contributor != null) {
contributor.updatePresentation(presentation, this);
}
}
Aggregations