use of org.eclipse.wst.xsd.ui.internal.design.editparts.XSDAttributesForAnnotationEditPart in project webtools.sourceediting by eclipse.
the class XSDAttributeDragAndDropCommand method calculateAttributeGroupList.
// Attribute Group related helper method
protected void calculateAttributeGroupList() {
EditPart editPart = target;
while (editPart != null) {
if (editPart instanceof ComplexTypeEditPart) {
List list = editPart.getChildren();
for (Iterator i = list.iterator(); i.hasNext(); ) {
Object child = i.next();
if (child instanceof CompartmentEditPart) {
List compartmentList = ((CompartmentEditPart) child).getChildren();
for (Iterator it = compartmentList.iterator(); it.hasNext(); ) {
Object obj = it.next();
if (obj instanceof XSDAttributesForAnnotationEditPart) {
XSDAttributesForAnnotationEditPart groups = (XSDAttributesForAnnotationEditPart) obj;
List groupList = groups.getChildren();
for (Iterator iter = groupList.iterator(); iter.hasNext(); ) {
Object groupChild = iter.next();
if (groupChild instanceof TargetConnectionSpacingFigureEditPart) {
targetSpacesList.add(groupChild);
} else if (groupChild instanceof AttributeGroupDefinitionEditPart) {
getAttributeGroupEditParts((AttributeGroupDefinitionEditPart) groupChild);
}
}
}
}
}
}
}
editPart = editPart.getParent();
}
}
Aggregations