Search in sources :

Example 1 with XSDRedefineContent

use of org.eclipse.xsd.XSDRedefineContent in project webtools.sourceediting by eclipse.

the class XSDRedefineAdapter method getCategoryChildren.

private List getCategoryChildren(int category) {
    List list = new ArrayList();
    XSDRedefine redefine = (XSDRedefine) target;
    Iterator iterator = redefine.getContents().iterator();
    while (iterator.hasNext()) {
        XSDRedefineContent redefineContent = (XSDRedefineContent) iterator.next();
        if (redefineContent instanceof XSDAttributeGroupDefinition && category == CategoryAdapter.ATTRIBUTES) {
            list.add(redefineContent);
        } else if (redefineContent instanceof XSDModelGroupDefinition && category == CategoryAdapter.GROUPS) {
            list.add(redefineContent);
        } else if (redefineContent instanceof XSDComplexTypeDefinition && category == CategoryAdapter.TYPES) {
            list.add(redefineContent);
        } else if (redefineContent instanceof XSDSimpleTypeDefinition && category == CategoryAdapter.TYPES) {
            list.add(redefineContent);
        }
    }
    List adapterList = new ArrayList();
    populateAdapterList(list, adapterList);
    return adapterList;
}
Also used : XSDRedefine(org.eclipse.xsd.XSDRedefine) XSDRedefineContent(org.eclipse.xsd.XSDRedefineContent) XSDSimpleTypeDefinition(org.eclipse.xsd.XSDSimpleTypeDefinition) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) List(java.util.List) XSDModelGroupDefinition(org.eclipse.xsd.XSDModelGroupDefinition) XSDComplexTypeDefinition(org.eclipse.xsd.XSDComplexTypeDefinition) XSDAttributeGroupDefinition(org.eclipse.xsd.XSDAttributeGroupDefinition)

Aggregations

ArrayList (java.util.ArrayList)1 Iterator (java.util.Iterator)1 List (java.util.List)1 XSDAttributeGroupDefinition (org.eclipse.xsd.XSDAttributeGroupDefinition)1 XSDComplexTypeDefinition (org.eclipse.xsd.XSDComplexTypeDefinition)1 XSDModelGroupDefinition (org.eclipse.xsd.XSDModelGroupDefinition)1 XSDRedefine (org.eclipse.xsd.XSDRedefine)1 XSDRedefineContent (org.eclipse.xsd.XSDRedefineContent)1 XSDSimpleTypeDefinition (org.eclipse.xsd.XSDSimpleTypeDefinition)1