}
}
// Add information in tooltip when history shows big variation
if (deviations[col-1] < 0) {
ConfigResultsElement configResultsElement = (ConfigResultsElement) scenarioResultsElement.getResultsElement(this.configName);
double[] stats = configResultsElement.getStatistics();
deviations[col-1] = stats[3];
}
if (deviations[col-1] > 20) {
// deviation is over 20% over the entire history
if (toolTipText == null) {
toolTipText = "";
} else {
toolTipText += ", ";
}
toolTipText += "History shows erratic values";
if (toolTipMessage == null) {
toolTipMessage = "";
} else {
toolTipMessage += ".\n";
}
toolTipMessage += "The results history shows that the variation of its delta is over 20% ("+PERCENTAGE_FORMAT.format(deviations[col-1])+"), hence its result is surely not reliable";
// set the text in italic
item.setFont(col, italic2);
toolTipStyle |= SWT.ICON_INFORMATION;
} else if (deviations[col-1] > 10) { // moderate the status when the test
// deviation is between 10% and 20% over the entire history
if (toolTipText == null) {
toolTipText = "";
} else {
toolTipText += ", ";
}
toolTipText += "History shows unstable values";
if (toolTipMessage == null) {
toolTipMessage = "";
} else {
toolTipMessage += ".\n";
}
toolTipMessage += "The results history shows that the variation of its delta is between 10% and 20% ("+PERCENTAGE_FORMAT.format(deviations[col-1])+"), hence its result may not be really reliable";
// set the text in italic
item.setFont(col, italic2);
if (toolTipStyle == SWT.BALLOON && delta >= -0.1) {
toolTipStyle |= SWT.ICON_INFORMATION;
} else {
// reduce icon severity from error to warning
toolTipStyle |= SWT.ICON_WARNING;
}
}
}
// Set tooltip
if (toolTipText != null) {
createToolTip(toolTipText, toolTipMessage, toolTipStyle, new Point(col, row));
}
// Baseline name
ConfigResultsElement configResultsElement = (ConfigResultsElement) scenarioResultsElement.getResultsElement(this.configName);
if (configResultsElement != null) {
String configBaselineName = configResultsElement.getBaselineBuildName(buildName);
if (baselineName == null) {
baselineName = configBaselineName;
} else if (baselineName.indexOf(configBaselineName) < 0) {
baselineName += ", " +configBaselineName;
}