*/
void printSummary(String configName, String configBox, ComponentResults componentResults, File outputDir, SubMonitor subMonitor) {
Iterator scenarios = componentResults.getResults();
while (scenarios.hasNext()) {
List highlightedPoints = new ArrayList();
ScenarioResults scenarioResults = (ScenarioResults) scenarios.next();
ConfigResults configResults = scenarioResults.getConfigResults(configName);
if (configResults == null || !configResults.isValid()) continue;
// get latest points of interest matching
if (this.pointsOfInterest != null) {
Iterator buildPrefixes = this.pointsOfInterest.iterator();
while (buildPrefixes.hasNext()) {
String buildPrefix = (String) buildPrefixes.next();
List builds = configResults.getBuilds(buildPrefix);
if (buildPrefix.indexOf('*') <0 && buildPrefix.indexOf('?') < 0) {
if (builds.size() > 0) {
highlightedPoints.add(builds.get(builds.size()-1));
}
} else {
highlightedPoints.addAll(builds);
}
}
}
String scenarioFileName = scenarioResults.getFileName();
File outputFile = new File(outputDir, scenarioFileName+".html");
PrintStream stream = null;
try {
stream = new PrintStream(new BufferedOutputStream(new FileOutputStream(outputFile)));
} catch (FileNotFoundException e) {
System.err.println("can't create output file" + outputFile); //$NON-NLS-1$
}
if (stream == null) {
stream = System.out;
}
stream.print(Utils.HTML_OPEN);
stream.print(Utils.HTML_DEFAULT_CSS);
stream.print("<title>" + scenarioResults.getName() + "(" + configBox + ")" + "</title></head>\n"); //$NON-NLS-1$
stream.print("<h4>Scenario: " + scenarioResults.getName() + " (" + configBox + ")</h4><br>\n"); //$NON-NLS-1$ //$NON-NLS-2$
String failureMessage = Utils.failureMessage(configResults.getCurrentBuildDeltaInfo(), true);
if (failureMessage != null){
stream.print("<table><tr><td><b>"+failureMessage+"</td></tr></table>\n");
}