/** * Set color and icon for a test method's TreeItem. * * @param node * @param outcome */ private void setColorAndIconForNode(TreeItem node, ApexTestOutcome outcome) { if (Utils.isEmpty(node) || Utils.isEmpty(outcome)) return; Display display = node.getDisplay(); if (outcome.equals(ApexTestOutcome.Pass)) { node.setForeground(display.getSystemColor(PASS_COLOR)); node.setImage(PASS_ICON); } else if (outcome.equals(ApexTestOutcome.Skip)) { node.setForeground(display.getSystemColor(WARNING_COLOR)); node.setImage(WARNING_ICON); } else { node.setForeground(display.getSystemColor(FAILURE_COLOR)); node.setImage(FAILURE_ICON); } }