XSDAttributeDeclaration att = attgcontent.getContent(); descriptor = createAttributeDescriptor(
protected XSDAttributeDeclaration getDelegate(XSDAttributeUse xsdAttributeUse) { return xsdAttributeUse.getContent(); }
/** * This returns a list of child descriptors based on the attributeUse * content, not the attributeUse itself. */ @Override public Collection<?> getNewChildDescriptors(Object object, EditingDomain domain, Object sibling) { Object content = ((XSDAttributeUse) object).getContent(); return domain.getNewChildDescriptors(content, sibling); }
/** * If <code>object</code> is a particle or an attribute use, this returns * its content; otherwise, <code>object</code> itself. */ protected Object getParticleOrAttributeUseContent(Object object) { if (object instanceof XSDParticle) { return ((XSDParticle) object).getContent(); } else if (object instanceof XSDAttributeUse) { return ((XSDAttributeUse) object).getContent(); } return object; }
public static List getChildAttributes(XSDComplexTypeDefinition ct) { EList attrContents = ct.getAttributeContents(); List attrs = new ArrayList(); for (int i = 0; i < attrContents.size(); i++) { Object next = attrContents.get(i); if (next instanceof XSDAttributeUse) { attrs.add(((XSDAttributeUse) next).getContent().getResolvedAttributeDeclaration()); } else if (next instanceof XSDAttributeGroupDefinition) { //XSDAttributeGroupDefinition attrGroup = (XSDAttributeGroupDefinition) next; } } return attrs; }
public void visitAttributeGroupDefinition(XSDAttributeGroupDefinition attributeGroup) { if (attributeGroup.getAttributeUses() != null) { for (Iterator iter = attributeGroup.getAttributeUses().iterator(); iter.hasNext(); ) { XSDAttributeUse attrUse = (XSDAttributeUse)iter.next(); visitAttributeDeclaration(attrUse.getContent()); } } }
public int compare(XSDAttributeUse o1, XSDAttributeUse o2) { String name1 = o1.getContent().getResolvedAttributeDeclaration().getName(); String name2 = o2.getContent().getResolvedAttributeDeclaration().getName(); if (name1 == null && name2 == null) { return 0; } else if (name1 == null) { return 1; } else if (name2 == null) { return -1; } else { return collator.compare(name1, name2); } } });
public int compare(XSDAttributeUse o1, XSDAttributeUse o2) { String name1 = o1.getContent().getResolvedAttributeDeclaration().getName(); String name2 = o2.getContent().getResolvedAttributeDeclaration().getName(); if (name1 == null && name2 == null) { return 0; } else if (name1 == null) { return 1; } else if (name2 == null) { return -1; } else { return collator.compare(name1, name2); } } });
public void visitAttributeGroupDefinition(XSDAttributeGroupDefinition attributeGroup) { for (Iterator it = attributeGroup.getContents().iterator(); it.hasNext(); ) { Object o = it.next(); if (o instanceof XSDAttributeUse) { XSDAttributeUse attrUse = (XSDAttributeUse)o; visitAttributeDeclaration(attrUse.getContent()); } else if (o instanceof XSDAttributeGroupDefinition) { XSDAttributeGroupDefinition attrGroup = (XSDAttributeGroupDefinition)o; visitAttributeGroupDefinition(attrGroup.getResolvedAttributeGroupDefinition()); } } }
if (attributeGroupContent instanceof XSDAttributeUse) XSDAttributeDeclaration attribute = ((XSDAttributeUse) attributeGroupContent).getContent(); if (attribute == selected) if (attributeGroupContent instanceof XSDAttributeUse) XSDAttributeDeclaration attribute = ((XSDAttributeUse) attributeGroupContent).getContent(); if (insertType == INSERT_AFTER)
visitAttributeDeclaration(attrUse.getContent());
if (xsdComponent instanceof XSDAttributeUse) xsdComponent = ((XSDAttributeUse)xsdComponent).getContent();
XSDAttributeDeclaration attrDecl = attrUse.getContent();
if (xsdComponent instanceof XSDAttributeUse) xsdComponent = ((XSDAttributeUse)xsdComponent).getContent();
if (attributeGroupContent instanceof XSDAttributeUse) XSDAttributeDeclaration attribute = ((XSDAttributeUse) attributeGroupContent).getContent(); if (attribute == selected) if (attributeGroupContent instanceof XSDAttributeUse) XSDAttributeDeclaration attribute = ((XSDAttributeUse) attributeGroupContent).getContent(); if (insertType == INSERT_BEFORE)
visitAttributeDeclaration(attrUse.getContent());
commandClass == CreateChildCommand.class) Object owner = ((XSDAttributeUse) object).getContent(); if (owner == null)
XSDAttributeDeclaration attrDecl = attrUse.getContent();
if (xsdComponent instanceof XSDAttributeUse) xsdComponent = ((XSDAttributeUse)xsdComponent).getContent();
if (xsdComponent instanceof XSDAttributeUse) xsdComponent = ((XSDAttributeUse)xsdComponent).getContent();