.equals(child.getTargetNamespace())) && COMMENT.getLocalPart().equals(child.getName())) { comment(child.getElement());
public void doHandleEvent(Event e) { if (e.widget == substGroupCombo) { XSDElementDeclaration eleDec = (XSDElementDeclaration) input; String value = substGroupCombo.getText(); String oldValue = eleDec.getElement().getAttribute(XSDConstants.SUBSTITUTIONGROUP_ATTRIBUTE); if (oldValue == null) oldValue = EMPTY; if (value.equals(oldValue)) return; UpdateAttributeValueCommand command = new UpdateAttributeValueCommand(eleDec.getElement(), XSDConstants.SUBSTITUTIONGROUP_ATTRIBUTE, value); command.setDeleteIfEmpty(true); getCommandStack().execute(command); } }
public void visitElementDeclaration(XSDElementDeclaration element) { super.visitElementDeclaration(element); XSDTypeDefinition type = element.getType(); if (type != null) { String ns = type.getTargetNamespace(); if (ns == null) ns = ""; // if (ns.equals(xsdSchema.getSchemaForSchemaNamespace())) if (ns.equals(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001)) { Element domElement = element.getElement(); if (domElement != null && domElement instanceof IDOMNode) { Attr typeAttr = domElement.getAttributeNode(XSDConstants.TYPE_ATTRIBUTE); if (typeAttr != null) { element.getElement().setAttribute(XSDConstants.TYPE_ATTRIBUTE, getNewQName(type, type.getName(), newPrefix)); } } } } }
public void execute() { try { beginRecording(element.getElement()); element.setResolvedElementDeclaration(ref); } finally { endRecording(); } }
Element element = xsdElementDeclaration.getElement(); boolean hasMinOccurs = element.hasAttribute(XSDConstants.MINOCCURS_ATTRIBUTE); boolean hasMaxOccurs = element.hasAttribute(XSDConstants.MAXOCCURS_ATTRIBUTE);
public void run() { DocumentImpl doc = (DocumentImpl) fSelectedComponent.getElement() .getOwnerDocument(); doc.getModel().beginRecording(this, getText()); MakeLocalElementGlobalCommand command = new MakeLocalElementGlobalCommand( fSelectedComponent); command.run(); doc.getModel().endRecording(this); }
&& (COMMENT.getNamespaceURI().equals(child.getTargetNamespace())) && COMMENT.getLocalPart().equals(child.getName())) { comment(child.getElement());
elements.add(resolvedElementDeclaration.getElement());
String value = blockCombo.getText(); UpdateAttributeValueCommand command = new UpdateAttributeValueCommand(eleDec.getElement(), XSDConstants.BLOCK_ATTRIBUTE, value); command.setDeleteIfEmpty(true); getCommandStack().execute(command); String value = finalCombo.getText(); UpdateAttributeValueCommand command = new UpdateAttributeValueCommand(eleDec.getElement(), XSDConstants.FINAL_ATTRIBUTE, value); command.setDeleteIfEmpty(true); getCommandStack().execute(command); eleDec.getElement().removeAttribute(XSDConstants.ABSTRACT_ATTRIBUTE); else
elements.add(resolvedElementDeclaration.getElement());
Element element = eleDec.getElement(); String blockAttValue = element.getAttribute(XSDConstants.BLOCK_ATTRIBUTE); if (blockAttValue != null)
(subXSDElementDeclaration.getConstraint() != XSDConstraint.FIXED_LITERAL || !((XSDSimpleTypeDefinition)superXSDElementDeclaration.getTypeDefinition()).equalLiterals (superXSDElementDeclaration.getElement(), superXSDElementDeclaration.getLexicalValue(), subXSDElementDeclaration.getElement(), subXSDElementDeclaration.getLexicalValue())))
Element element = namedComponent.getElement(); if (element != null)
Command command = new UpdateAttributeValueCommand(concreteComponent.getElement(), XSDConstants.SUBSTITUTIONGROUP_ATTRIBUTE, elementDec.getQName(concreteComponent.getSchema())); command.execute(); Command command = new UpdateAttributeValueCommand(concreteComponent.getElement(), XSDConstants.SUBSTITUTIONGROUP_ATTRIBUTE, ((XSDElementDeclaration)component.getObject()).getQName(concreteComponent.getSchema())); command.execute();
elementDeclaration.setAnonymousTypeDefinition(simpleType); elementDeclaration.getElement().removeAttribute("type"); //TODO use external literal string
if (referenceType == null) referenceType = getGenericType(xsdElementDeclaration, xsdElementDeclaration.getElement(), eClass, getEcoreAttribute(xsdElementDeclaration, "reference"));
if (referenceType == null) referenceType = getGenericType(xsdElementDeclaration, xsdElementDeclaration.getElement(), eClass, getEcoreAttribute(xsdElementDeclaration, "reference"));