protected void buildAttributeGroupIndex() { attributeGroupIndex = new HashMap(); for (int i = 0; i < schemas.length; i++) { XSDSchema schema = schemas[i]; for (Iterator g = schema.getAttributeGroupDefinitions().iterator(); g.hasNext(); ) { XSDAttributeGroupDefinition group = (XSDAttributeGroupDefinition) g.next(); QName qName = new QName(group.getTargetNamespace(), group.getName()); attributeGroupIndex.put(qName, group); } } }
protected void buildAttributeGroupIndex() { attributeGroupIndex = new HashMap(); for (int i = 0; i < schemas.length; i++) { XSDSchema schema = schemas[i]; for (Iterator g = schema.getAttributeGroupDefinitions().iterator(); g.hasNext();) { XSDAttributeGroupDefinition group = (XSDAttributeGroupDefinition) g.next(); QName qName = new QName(group.getTargetNamespace(), group.getName()); attributeGroupIndex.put(qName, group); } } }
protected void buildAttributeGroupIndex() { attributeGroupIndex = new HashMap(); for (int i = 0; i < schemas.length; i++) { XSDSchema schema = schemas[i]; for (Iterator g = schema.getAttributeGroupDefinitions().iterator(); g.hasNext();) { XSDAttributeGroupDefinition group = (XSDAttributeGroupDefinition) g.next(); QName qName = new QName(group.getTargetNamespace(), group.getName()); attributeGroupIndex.put(qName, group); } } }
protected void buildAttributeGroupIndex() { attributeGroupIndex = new HashMap(); for (int i = 0; i < schemas.length; i++) { XSDSchema schema = schemas[i]; for (Iterator g = schema.getAttributeGroupDefinitions().iterator(); g.hasNext();) { XSDAttributeGroupDefinition group = (XSDAttributeGroupDefinition) g .next(); QName qName = new QName(group.getTargetNamespace(), group.getName()); attributeGroupIndex.put(qName, group); } } }
public String getText() { XSDAttributeGroupDefinition xsdAttributeGroupDefinition = (XSDAttributeGroupDefinition) target; String result = xsdAttributeGroupDefinition.isAttributeGroupDefinitionReference() ? xsdAttributeGroupDefinition.getQName() : xsdAttributeGroupDefinition.getName(); return result == null ? Messages._UI_LABEL_ABSENT : result; }
@Override public String getText(Object object) { XSDAttributeGroupDefinition xsdAttributeGroupDefinition = ((XSDAttributeGroupDefinition)object); String result = xsdAttributeGroupDefinition.isAttributeGroupDefinitionReference() ? xsdAttributeGroupDefinition.getQName() : xsdAttributeGroupDefinition.getName(); return result == null ? XSDEditPlugin.INSTANCE.getString("_UI_Absent_label") : result; }
@Override public Object caseXSDAttributeGroupDefinition(XSDAttributeGroupDefinition xsdAttributeGroupDefinition) { XSDAttributeGroupDefinition redefinedAttributeGroupDefinition = resolveAttributeGroupDefinition(xsdAttributeGroupDefinition.getName()); for (XSDSchemaImpl schemaToRedefine : getSchemasToRedefine()) { int index = schemaToRedefine.getAttributeGroupDefinitions().indexOf(redefinedAttributeGroupDefinition); if (index != -1) { schemaToRedefine.getAttributeGroupDefinitions().set(index, xsdAttributeGroupDefinition); schemaToRedefine.redefinitionMap.put(xsdAttributeGroupDefinition, redefinedAttributeGroupDefinition); } } return this; } @Override
@Override public Object caseXSDAttributeGroupDefinition(XSDAttributeGroupDefinition xsdAttributeGroupDefinition) { XSDAttributeGroupDefinition redefinedAttributeGroupDefinition = resolveAttributeGroupDefinition(xsdAttributeGroupDefinition.getName()); for (XSDSchemaImpl schemaToRedefine : getSchemasToRedefine()) { int index = schemaToRedefine.getAttributeGroupDefinitions().indexOf(redefinedAttributeGroupDefinition); if (index != -1) { schemaToRedefine.getAttributeGroupDefinitions().set(index, xsdAttributeGroupDefinition); schemaToRedefine.redefinitionMap.put(xsdAttributeGroupDefinition, redefinedAttributeGroupDefinition); } } return this; } @Override
@Override protected void patch() { analysisState = UNANALYZED; super.patch(); XSDAttributeGroupDefinition theResolvedAttributeGroupDefinition = getResolvedAttributeGroupDefinition(); if (theResolvedAttributeGroupDefinition != this && (forceResolve || theResolvedAttributeGroupDefinition.getContainer() == null)) { XSDAttributeGroupDefinition newResolvedAttributeGroupDefinition = resolveAttributeGroupDefinition (theResolvedAttributeGroupDefinition.getTargetNamespace(), theResolvedAttributeGroupDefinition.getName()); if (forceResolve || newResolvedAttributeGroupDefinition.getContainer() != null) { handleNewResolvedAttributeGroupDefinition(newResolvedAttributeGroupDefinition); } } }
@Override protected void patch() { analysisState = UNANALYZED; super.patch(); XSDAttributeGroupDefinition theResolvedAttributeGroupDefinition = getResolvedAttributeGroupDefinition(); if (theResolvedAttributeGroupDefinition != this && (forceResolve || theResolvedAttributeGroupDefinition.getContainer() == null)) { XSDAttributeGroupDefinition newResolvedAttributeGroupDefinition = resolveAttributeGroupDefinition (theResolvedAttributeGroupDefinition.getTargetNamespace(), theResolvedAttributeGroupDefinition.getName()); if (forceResolve || newResolvedAttributeGroupDefinition.getContainer() != null) { handleNewResolvedAttributeGroupDefinition(newResolvedAttributeGroupDefinition); } } }
(XSDDiagnosticSeverity.ERROR_LITERAL, "src-redefine.7.2.1", xsdAttributeGroupDefinition.getName());
clonedAttributeGroupDefinition.setResolvedAttributeGroupDefinition (createUnresolvedAttributeGroupDefinition (theResolvedAttributeGroupDefinition.getTargetNamespace(), theResolvedAttributeGroupDefinition.getName()));
clonedAttributeGroupDefinition.setResolvedAttributeGroupDefinition (createUnresolvedAttributeGroupDefinition (theResolvedAttributeGroupDefinition.getTargetNamespace(), theResolvedAttributeGroupDefinition.getName()));