if (applicationUrl == null && endPointUrl == null && traceViewUrl == null) {
return;
}
final Document document = parent.getOwnerDocument();
final DivElement element = document.createDivElement();
element.setClassName(css.springInsightViews());
element.setInnerText("Spring Insight Views: ");
element.appendChild(document.createTextNode("("));
// Add Trace URL
if (traceViewUrl != null) {
element.appendChild(createNewTabLink(document, css.springInsightLink(),
traceViewUrl, "Trace"));
}
// Add EndPoint URL
if (endPointUrl != null) {
// Is there a previous item?
if (traceViewUrl != null) {
element.appendChild(document.createTextNode(", "));
}
element.appendChild(createNewTabLink(document, css.springInsightLink(),
endPointUrl, "EndPoint"));
}
// Add Application URL
if (applicationUrl != null) {
// Is there a previous item?
if (traceViewUrl != null || endPointUrl != null) {
element.appendChild(document.createTextNode(", "));
}
element.appendChild(createNewTabLink(document, css.springInsightLink(),
applicationUrl, "Application"));
}
element.appendChild(document.createTextNode(") "));
parent.appendChild(element);
}