if (at.getName().equals(ce.getName())) { found = true; if (ce.getContainer() instanceof XSDParticle) { XSDParticle part = (XSDParticle) ce.getContainer(); at.setMinOccurs(part.getMinOccurs()); at.setMaxOccurs(part.getMaxOccurs());
for (XSDElementDeclaration subs : dec.getSubstitutionGroup()) { if (subs != null && subs.getContainer() != null && subs.getContainer().equals(schema)) { toRemove.add(subs);
/** * This returns XSDElementDeclaration.gif. */ @Override public Object getImage(Object object) { XSDElementDeclaration xsdElementDeclaration = ((XSDElementDeclaration)object); XSDElementDeclaration resolvedElementDeclaration = xsdElementDeclaration.getResolvedElementDeclaration(); return XSDEditPlugin.INSTANCE.getImage (resolvedElementDeclaration.getContainer() == null ? "full/obj16/XSDElementUnresolved" : xsdElementDeclaration.getResolvedElementDeclaration() == xsdElementDeclaration ? "full/obj16/XSDElementDeclaration" : "full/obj16/XSDElementUse"); }
if (hasMinOccurs) int min = ((XSDParticle) xsdElementDeclaration.getContainer()).getMinOccurs(); if (min == XSDParticle.UNBOUNDED) int min = ((XSDParticle) xsdElementDeclaration.getContainer()).getMinOccurs(); result.append(String.valueOf(min)); int max = ((XSDParticle) xsdElementDeclaration.getContainer()).getMaxOccurs(); result.append(".."); //$NON-NLS-1$ if (max == XSDParticle.UNBOUNDED) int max = ((XSDParticle) xsdElementDeclaration.getContainer()).getMaxOccurs(); result.append(String.valueOf(max));
if (theSubstitutionGroupAffiliation != null && theSubstitutionGroupAffiliation.getContainer() == null) if (newSubstitutionGroupAffiliation.getContainer() != null && newSubstitutionGroupAffiliation != theSubstitutionGroupAffiliation)
if (theSubstitutionGroupAffiliation != null && theSubstitutionGroupAffiliation.getContainer() == null) if (newSubstitutionGroupAffiliation.getContainer() != null && newSubstitutionGroupAffiliation != theSubstitutionGroupAffiliation)
XSDModelGroup modelGroup = (XSDModelGroup) ((XSDElementDeclaration) previousRefComponent).getContainer().getContainer(); if (parentEditPart != null) modelGroup = ((ModelGroupEditPart) parentEditPart).getXSDModelGroup(); XSDModelGroup modelGroup = (XSDModelGroup) ((XSDElementDeclaration) nextRefComponent).getContainer().getContainer(); action = new MoveXSDElementAction(modelGroup, xsdComponentToDrag, previousRefComponent, nextRefComponent); XSDModelGroup modelGroup = (XSDModelGroup) ((XSDElementDeclaration) previousRefComponent).getContainer().getContainer(); if (parentEditPart != null) modelGroup = ((ModelGroupEditPart) parentEditPart).getXSDModelGroup();
if (eleDec.getContainer() instanceof XSDSchema) // global element
protected void handleAnalysis() { if (!isElementDeclarationReference()) { XSDElementDeclaration theSubstitutionGroupAffiliation = getSubstitutionGroupAffiliation(); if (theSubstitutionGroupAffiliation != null && theSubstitutionGroupAffiliation.getContainer() != null) { ((XSDConcreteComponentImpl)theSubstitutionGroupAffiliation).analyze(); } XSDTypeDefinition theTypeDefinition = getTypeDefinition(); if (!isTypeExplicit || theTypeDefinition == null) { XSDTypeDefinition newTypeDefinition = theSubstitutionGroupAffiliation == null || theSubstitutionGroupAffiliation.getTypeDefinition() == null ? getSchema().getSchemaForSchema().resolveTypeDefinition("anyType") : theSubstitutionGroupAffiliation.getTypeDefinition(); if (newTypeDefinition != theTypeDefinition) { isTypeExplicit = false; setTypeDefinitionGen(newTypeDefinition); } } } super.analyze(); }
protected void handleAnalysis() { if (!isElementDeclarationReference()) { XSDElementDeclaration theSubstitutionGroupAffiliation = getSubstitutionGroupAffiliation(); if (theSubstitutionGroupAffiliation != null && theSubstitutionGroupAffiliation.getContainer() != null) { ((XSDConcreteComponentImpl)theSubstitutionGroupAffiliation).analyze(); } XSDTypeDefinition theTypeDefinition = getTypeDefinition(); if (!isTypeExplicit || theTypeDefinition == null) { XSDTypeDefinition newTypeDefinition = theSubstitutionGroupAffiliation == null || theSubstitutionGroupAffiliation.getTypeDefinition() == null ? getSchema().getSchemaForSchema().resolveTypeDefinition("anyType") : theSubstitutionGroupAffiliation.getTypeDefinition(); if (newTypeDefinition != theTypeDefinition) { isTypeExplicit = false; setTypeDefinitionGen(newTypeDefinition); } } } super.analyze(); }
if (elem.getContainer() != null) Adapter adap = XSDAdapterFactory.getInstance().adapt(elem.getContainer()); if (adap instanceof XSDParticleAdapter) Adapter adap = XSDAdapterFactory.getInstance().adapt(elem.getContainer()); if (adap instanceof XSDParticleAdapter)
XSDConcreteComponent container = xsdElementDeclaration.getContainer(); if (container instanceof XSDParticle)
if (theResolvedElementDeclaration.getContainer() == null) if (substitutionGroupAffiliation != null) if (substitutionGroupAffiliation.getResolvedElementDeclaration().getContainer() == null)
if (theResolvedElementDeclaration.getContainer() == null) if (substitutionGroupAffiliation != null) if (substitutionGroupAffiliation.getResolvedElementDeclaration().getContainer() == null)