protected void assertHasDerivedMarker(ShapeNodeEditPart p, boolean check) {
boolean found = false;
for (Object o : p.getChildren()) {
if (o instanceof IAccessibleTextAwareEditPart) {
IAccessibleTextAwareEditPart text = (IAccessibleTextAwareEditPart) o;
// is this a stereotype label? then we don't need to check it
if (text.getLabelText().equals(": " + p.resolveSemanticElement().eClass().getName()))
continue;
boolean c = hasDerivedMarker(text.getLabelText());
if (check) {
assertTrue("The label '" + text + " (" + text.getLabelText() + ") should be derived", c);
} else {
assertFalse("The label '" + text + " (" + text.getLabelText() + ") should not be derived", c);
}
found = true;
}
}
assertTrue("No IAccessibleTextAwareEditPart was ever found on " + p, found);