protected void displayErrorDialog(Map errors) {
if (errors == null || errors.size() == 0) return;
String[] footer = EVMetrics.isWarningOnly(errors) ? null : resources
.getStrings("Error_Dialog.Foot");
ErrorReporter err = new ErrorReporter
(resources.getString("Error_Dialog.Title"),
resources.getStrings("Error_Dialog.Head"),
footer);
Iterator i = errors.keySet().iterator();
while (i.hasNext()) {
err.logError(StringUtils.findAndReplace((String) i.next(), //
"\n#", "\n#http://ignored/"));
}
err.setHyperlinkListener(new HyperlinkListener() {
public void hyperlinkUpdate(HyperlinkEvent e) {
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
String url = e.getURL().getFile();
int pos = url.lastIndexOf('/');
String helpSet = url.substring(0, pos);
String topic = url.substring(pos + 1);
String helpUri = helpSet + "/frame.html?" + topic;
Browser.launch(helpUri);
}
}
});
err.done();
}