use of org.eclipse.wst.xsd.ui.internal.design.editparts.ModelGroupDefinitionReferenceEditPart in project webtools.sourceediting by eclipse.
the class XSDElementDragAndDropCommand method getModelGroupEditParts.
// Model Group related helper method
protected List getModelGroupEditParts(ModelGroupEditPart modelGroupEditPart) {
List modelGroupList = new ArrayList();
List list = modelGroupEditPart.getChildren();
for (Iterator i = list.iterator(); i.hasNext(); ) {
Object object = i.next();
if (object instanceof TargetConnectionSpacingFigureEditPart) {
targetSpacesList.add(object);
} else if (object instanceof ModelGroupDefinitionReferenceEditPart) {
ModelGroupDefinitionReferenceEditPart groupRef = (ModelGroupDefinitionReferenceEditPart) object;
List groupRefChildren = groupRef.getChildren();
for (Iterator it = groupRefChildren.iterator(); it.hasNext(); ) {
Object o = it.next();
if (o instanceof ModelGroupEditPart) {
getModelGroupEditParts((ModelGroupEditPart) o);
}
}
} else if (object instanceof ModelGroupEditPart) {
getModelGroupEditParts((ModelGroupEditPart) object);
}
}
return modelGroupList;
}
Aggregations