public GetPropertyExecutor(Object parent, XSDNamedComponent content) { this.parent = parent; name = new QName(content.getTargetNamespace(), content.getName()); }
String ns1 = component.getTargetNamespace(); String ns2 = qName.getNamespaceURI(); String n1 = component.getName(); String n2 = qName.getLocalPart(); if (component.getSchema() != null) { ns1 = component.getSchema().getTargetNamespace();
XSDNamedComponent named = (XSDNamedComponent)arguments[0]; XSDSchema schema = named.getSchema(); XSDTypeDefinition type = null; stringBuffer.append(named.getTargetNamespace()); stringBuffer.append(TEXT_2); stringBuffer.append(named.getName()); stringBuffer.append(TEXT_3); xmls.getTransformer().transform(new DOMSource(named.getElement()), new StreamResult(writer)); String className = named.getName().substring(0,1).toUpperCase() + named.getName().substring(1) + "BindingTest"; String baseClassName = prefix.toUpperCase() + "TestSupport"; stringBuffer.append(prefix.toUpperCase()); stringBuffer.append(TEXT_9); stringBuffer.append(named.getName()); stringBuffer.append(TEXT_10); stringBuffer.append(prefix.toUpperCase()); stringBuffer.append(TEXT_11); stringBuffer.append(named.getName()); stringBuffer.append(TEXT_12); return stringBuffer.toString();
protected boolean included(XSDNamedComponent c) { return included != null ? included.contains( c.getName() ) : true; } }
public void validateNoDuplicates(String componentNoun, EList<? extends XSDNamedComponent> xsdNamedComponents) { String name = null; String targetNamespace = null; for (XSDNamedComponent xsdNamedComponent : xsdNamedComponents) { if (xsdNamedComponent.hasNameAndTargetNamespace(name, targetNamespace)) { getDiagnosticTarget(xsdNamedComponent).createDiagnostic (XSDDiagnosticSeverity.ERROR_LITERAL, "coss-schema.2", XSDPlugin.INSTANCE.getString(componentNoun), xsdNamedComponent.getURI()); } name = xsdNamedComponent.getName(); targetNamespace = xsdNamedComponent.getTargetNamespace(); } }
/** * Performs a rename refactoring to rename the component and all the * references to it within the current schema. * * @param newName the new component name. */ private void renameComponent(String newName) { // this is a 'globally' defined component (e.g. global element) if (component.eContainer() instanceof XSDSchema) { RefactoringComponent refactoringComponent = new XMLRefactoringComponent( component, (IDOMElement)component.getElement(), component.getName(), component.getTargetNamespace()); RenameComponentProcessor processor = new RenameComponentProcessor(refactoringComponent, newName, true); RenameRefactoring refactoring = new RenameRefactoring(processor); PerformUnsavedRefactoringOperation operation = new PerformUnsavedRefactoringOperation(refactoring); operation.run(null); } else { // this is a 'locally' defined component (e.g. local element) // no need to call refactoring since this component can't be referenced component.setName(newName); } } }
public EPackage getEPackage(XSDNamedComponent xsdNamedComponent) XSDSchema containingXSDSchema = xsdNamedComponent.getSchema(); if (containingXSDSchema != null && !xsdSchemas.contains(containingXSDSchema)) xsdNamedComponent.getTargetNamespace() : containingXSDSchema.getTargetNamespace(); EPackage ePackage = targetNamespaceToEPackageMap.get(targetNamespace);
boolean target(XSDNamedComponent c, XSDSchema schema) { return c.getTargetNamespace().equals(schema.getTargetNamespace()); }
Element element = namedComponent.getElement(); if (element != null) String name = namedComponent.getName(); if (name != null)
public UpdateNameCommand(String label, XSDNamedComponent component, String newName) { super(label); if (component instanceof XSDComplexTypeDefinition && component.getName() == null && component.eContainer() instanceof XSDNamedComponent && ((XSDNamedComponent) component.eContainer()).getName() != null) { component = (XSDNamedComponent) component.eContainer(); } this.component = component; this.newName = newName; // this.oldName = component.getName(); }
public void doWidgetSelected(SelectionEvent e) { if (e.widget == componentNameCombo) { String newValue = componentNameCombo.getText(); if (input instanceof XSDNamedComponent) { XSDNamedComponent namedComponent = (XSDNamedComponent)input; Element element = namedComponent.getElement(); if (namedComponent instanceof XSDModelGroupDefinition) { element.setAttribute(XSDConstants.REF_ATTRIBUTE, newValue); } } } super.doWidgetSelected(e); }
protected void changeReference(EReference eReference) { if (isReconciling) return; super.changeReference(eReference); Element theElement = getElement(); if (theElement != null) { if (eReference == null || eReference == WSDLPackage.Literals.PART__TYPE_DEFINITION) { XSDTypeDefinition typeDefinition = getTypeDefinition(); if (typeDefinition != null) { niceSetAttributeURIValue(theElement, WSDLConstants.TYPE_ATTRIBUTE, typeDefinition.getURI()); } } if (eReference == null || eReference == WSDLPackage.Literals.PART__ELEMENT_DECLARATION) { XSDElementDeclaration elementDecl = getElementDeclaration(); if (elementDecl != null) { niceSetAttributeURIValue(theElement, WSDLConstants.ELEMENT_ATTRIBUTE, elementDecl.getURI()); } } } }
String baseName = xsdNamedComponent.getAliasName(); if (container instanceof XSDSimpleTypeDefinition)
public void validateNoDuplicates(String componentNoun, EList<? extends XSDNamedComponent> xsdNamedComponents) { String name = null; String targetNamespace = null; for (XSDNamedComponent xsdNamedComponent : xsdNamedComponents) { if (xsdNamedComponent.hasNameAndTargetNamespace(name, targetNamespace)) { getDiagnosticTarget(xsdNamedComponent).createDiagnostic (XSDDiagnosticSeverity.ERROR_LITERAL, "coss-schema.2", XSDPlugin.INSTANCE.getString(componentNoun), xsdNamedComponent.getURI()); } name = xsdNamedComponent.getName(); targetNamespace = xsdNamedComponent.getTargetNamespace(); } }
public EPackage getEPackage(XSDNamedComponent xsdNamedComponent) XSDSchema containingXSDSchema = xsdNamedComponent.getSchema(); if (containingXSDSchema != null && !xsdSchemas.contains(containingXSDSchema)) xsdNamedComponent.getTargetNamespace() : containingXSDSchema.getTargetNamespace(); EPackage ePackage = targetNamespaceToEPackageMap.get(targetNamespace);
protected boolean isFromThisNamespace(XSDNamedComponent xsdNamedComponent) { String targetNamespace = xsdNamedComponent.getTargetNamespace(); return targetNamespace == null ? xsdSchema.getTargetNamespace() == null : targetNamespace.equals(xsdSchema.getTargetNamespace()); }
Element element = namedComponent.getElement(); if (element != null) String name = namedComponent.getName(); if (name != null)
public void doWidgetSelected(SelectionEvent e) { if (e.widget == refCombo) { String newValue = refCombo.getText(); if (input instanceof XSDNamedComponent) { XSDNamedComponent namedComponent = (XSDNamedComponent)input; Element element = namedComponent.getElement(); if (namedComponent instanceof XSDAttributeGroupDefinition) { element.setAttribute(XSDConstants.REF_ATTRIBUTE, newValue); } } } super.doWidgetSelected(e); }
String baseName = xsdNamedComponent.getAliasName(); if (container instanceof XSDSimpleTypeDefinition)