in plugin/src/com/facebook/buck/plugin/intellij/ui/MessageTreeRenderer.java [39:100]
protected void initComponent(JTree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus) {
if (value instanceof ProgressNode) {
ProgressNode node = (ProgressNode) value;
String[] text = new String[] {node.getName()};
String prefix;
Icon icon;
switch (node.getType()) {
case DIRECTORY:
prefix = "";
icon = AllIcons.General.Filter;
break;
case BUILDING:
prefix = "Building";
icon = AllIcons.Process.Step_1;
break;
case BUILT:
prefix = "Built";
icon = AllIcons.Ant.Message;
break;
case BUILT_CACHED:
prefix = "Built";
icon = AllIcons.General.Gear;
break;
case BUILD_ERROR:
prefix = "Error";
icon = AllIcons.General.Error;
break;
case TEST_CASE_SUCCESS:
prefix = "Test";
icon = AllIcons.Modules.TestRoot;
break;
case TEST_CASE_FAILURE:
prefix = "Test Failure";
icon = AllIcons.General.Error;
break;
case TEST_RESULT_SUCCESS:
prefix = "";
icon = AllIcons.Nodes.Advice;
break;
case TEST_RESULT_FAILURE:
prefix = "";
icon = AllIcons.General.Error;
break;
default:
icon = AllIcons.General.Error;
prefix = "";
}
setText(text, prefix);
setIcon(icon);
} else {
String[] text = new String[] {value == null ? "" : value.toString()};
text[0] = Strings.nullToEmpty(text[0]);
setText(text, null);
setIcon(null);
}
}