public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { // Use the animated flavour as we don't know beforehand how many ticks we need. // The task name will be displayed by the code in XSDResourceImpl. monitor.beginTask("", IProgressMonitor.UNKNOWN); //$NON-NLS-1$ Map loadOptions = resourceSet.getLoadOptions(); loadOptions.put(XSDResourceImpl.XSD_PROGRESS_MONITOR, monitor); schema.setElement(element); loadOptions.remove(XSDResourceImpl.XSD_PROGRESS_MONITOR); } };
public static XSDSchema createSchema(Node node) { XSDSchema xsdSchema = XSDFactory.eINSTANCE.createXSDSchema(); // if (XSDConstants.nodeType(node) == XSDConstants.SCHEMA_ELEMENT) { // Force the loading of the "meta" schema for schema instance instance. // String schemaForSchemaNamespace = node.getNamespaceURI(); getSchemaForSchema(schemaForSchemaNamespace); xsdSchema.setElement((Element)node); } return xsdSchema; }
public static XSDSchema createSchema(Node node) { XSDSchema xsdSchema = XSDFactory.eINSTANCE.createXSDSchema(); // if (XSDConstants.nodeType(node) == XSDConstants.SCHEMA_ELEMENT) { // Force the loading of the "meta" schema for schema instance instance. // String schemaForSchemaNamespace = node.getNamespaceURI(); getSchemaForSchema(schemaForSchemaNamespace); xsdSchema.setElement((Element)node); } return xsdSchema; }
xsdSchema.setElement((Element)node); return xsdSchema;
xsdSchema.setElement((Element)node); return xsdSchema;
xsdSchema./*{@link XSDConcreteComponent#setElement */setElement/*}*/(element);
xsdSchema./*{@link XSDConcreteComponent#setElement */setElement/*}*/(element);
public void setSchema(XSDSchema xsdSchema) { if (document != null) { this.xsdSchema = xsdSchema; Element element = document.getDocumentElement(); if (element != null) { xsdSchema.setElement(element); } xsdSchema.clearDiagnostics(); XSDResourceImpl.assignDiagnostics(xsdSchema, xsdDiagnostics); XSDResourceImpl resource = (XSDResourceImpl)xsdSchema.eResource(); if (resource != null && getEncoding() != null) { resource.getDefaultSaveOptions().put(XSDResourceImpl.XSD_ENCODING, getEncoding()); } } }
public void setSchema(XSDSchema xsdSchema) { if (document != null) { this.xsdSchema = xsdSchema; Element element = document.getDocumentElement(); if (element != null) { xsdSchema.setElement(element); } xsdSchema.clearDiagnostics(); XSDResourceImpl.assignDiagnostics(xsdSchema, xsdDiagnostics); XSDResourceImpl resource = (XSDResourceImpl)xsdSchema.eResource(); if (resource != null && getEncoding() != null) { resource.getDefaultSaveOptions().put(XSDResourceImpl.XSD_ENCODING, getEncoding()); } } }
schema.setElement(schemaElement); schema.getAttributeGroupDefinitions().clear(); schema.setElement(null);