Search in sources :

Example 1 with DashboardRunConfigurationStatus

use of com.intellij.execution.dashboard.DashboardRunConfigurationStatus 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);
    }
}
Also used : RunDashboardContributor(com.intellij.execution.dashboard.RunDashboardContributor) RunnerAndConfigurationSettings(com.intellij.execution.RunnerAndConfigurationSettings) DashboardRunConfigurationStatus(com.intellij.execution.dashboard.DashboardRunConfigurationStatus)

Aggregations

RunnerAndConfigurationSettings (com.intellij.execution.RunnerAndConfigurationSettings)1 DashboardRunConfigurationStatus (com.intellij.execution.dashboard.DashboardRunConfigurationStatus)1 RunDashboardContributor (com.intellij.execution.dashboard.RunDashboardContributor)1