Search in sources :

Example 1 with DashboardRunConfigurationNode

use of com.intellij.execution.dashboard.DashboardRunConfigurationNode in project intellij-community by JetBrains.

the class ConfigurationTypeDashboardGroupingRule method getGroup.

@Nullable
@Override
public DashboardGroup getGroup(AbstractTreeNode<?> node) {
    if (node instanceof DashboardRunConfigurationNode) {
        RunnerAndConfigurationSettings configurationSettings = ((DashboardRunConfigurationNode) node).getConfigurationSettings();
        ConfigurationType type = configurationSettings.getType();
        if (type != null) {
            return new DashboardGroupImpl<>(type, type.getDisplayName(), type.getIcon());
        }
    }
    return null;
}
Also used : ConfigurationType(com.intellij.execution.configurations.ConfigurationType) DashboardRunConfigurationNode(com.intellij.execution.dashboard.DashboardRunConfigurationNode) RunnerAndConfigurationSettings(com.intellij.execution.RunnerAndConfigurationSettings) Nullable(org.jetbrains.annotations.Nullable)

Example 2 with DashboardRunConfigurationNode

use of com.intellij.execution.dashboard.DashboardRunConfigurationNode in project intellij-community by JetBrains.

the class FolderDashboardGroupingRule method getGroup.

@Nullable
@Override
public DashboardGroup getGroup(AbstractTreeNode<?> node) {
    if (node instanceof DashboardRunConfigurationNode) {
        RunnerAndConfigurationSettings configurationSettings = ((DashboardRunConfigurationNode) node).getConfigurationSettings();
        String folderName = configurationSettings.getFolderName();
        if (folderName != null) {
            return new DashboardGroupImpl<>(folderName, folderName, AllIcons.Nodes.Folder);
        }
    }
    return null;
}
Also used : DashboardRunConfigurationNode(com.intellij.execution.dashboard.DashboardRunConfigurationNode) RunnerAndConfigurationSettings(com.intellij.execution.RunnerAndConfigurationSettings) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

RunnerAndConfigurationSettings (com.intellij.execution.RunnerAndConfigurationSettings)2 DashboardRunConfigurationNode (com.intellij.execution.dashboard.DashboardRunConfigurationNode)2 Nullable (org.jetbrains.annotations.Nullable)2 ConfigurationType (com.intellij.execution.configurations.ConfigurationType)1