private void adopt(XSDSchema xsdSchema) { Definition definition = getEnclosingDefinition(); if (definition == null) return; Document document = definition.getDocument(); if (document == null) document = ((DefinitionImpl)definition).updateDocument(); if (xsdSchema.getDocument() != null) xsdSchema.setDocument(null); xsdSchema.setDocument(document); }
resourceSet.getResources().add(resource); schema.setDocument(document); final Element element = document.getDocumentElement(); if (element != null)
protected void changeAttribute(EAttribute eAttribute) { if (isReconciling) return; // TODO... revist this block of code // if (eAttribute == null || eAttribute == WSDLPackage.Literals.XSD_SCHEMA_EXTENSIBILITY_ELEMENT__SCHEMA) { // We got a new schema so re-parent it. // cs... are we really doing the right thing here? this seems strange if (schema != null) { if ((schema.getElement() == null && getElement() == null) || (schema.getElement() != getElement())) { schema.setDocument(null); schema.setElement(null); adopt(schema); schema.updateElement(); } } } else if (eAttribute == WSDLPackage.Literals.WSDL_ELEMENT__ELEMENT) { setSchema(createSchema(element)); // element is not null } } } //XSDSchemaExtensibilityElementImpl