OntoUML.diagram.part.ValidationMarker[] markers = OntoUML.diagram.part.ValidationMarker
.getMarkers(editPart.getViewer(), viewId);
if (markers == null || markers.length == 0) {
return;
}
Label toolTip = null;
for (int i = 0; i < markers.length; i++) {
OntoUML.diagram.part.ValidationMarker marker = markers[i];
int nextSeverity = marker.getStatusSeverity();
Image nextImage = getImage(nextSeverity);
if (foundMarker == null) {
foundMarker = marker;
toolTip = new Label(marker.getMessage(), nextImage);
} else {
if (toolTip.getChildren().isEmpty()) {
Label comositeLabel = new Label();
FlowLayout fl = new FlowLayout(false);
fl.setMinorSpacing(0);
comositeLabel.setLayoutManager(fl);
comositeLabel.add(toolTip);
toolTip = comositeLabel;
}
toolTip.add(new Label(marker.getMessage(), nextImage));
}
severity = (nextSeverity > severity) ? nextSeverity : severity;
}
if (foundMarker == null) {
return;