private boolean fallBackCheckIsReadOnly() { Element element = ((XSDConcreteComponent)target).getElement(); if (element instanceof IDOMNode || element instanceof ElementImpl) { return false; } return true; }
@Override public Object getPropertyValue(Object o) { XSDConcreteComponent concreteComponent = ((XSDConcreteComponent)o); if (concreteComponent.getElement() == null) { return ""; } else { return concreteComponent.getElement().getTagName(); } } });
protected boolean isTreeViewerInputElement(Element element) { if (input instanceof XSDConcreteComponent) { XSDConcreteComponent component = (XSDConcreteComponent)input; Element componentElement = component.getElement(); Node parent = element.getParentNode(); Node grandParent = parent != null ? parent.getParentNode() : null; return componentElement == element || componentElement == parent || componentElement == grandParent; } return false; }
protected List<XSDTypeDefinition> getEcoreTypeQNamesAttribute(XSDConcreteComponent xsdConcreteComponent, String attribute) { Element element = xsdConcreteComponent.getElement(); return element == null ? Collections.<XSDTypeDefinition>emptyList() : getEcoreTypeQNamesAttribute(xsdConcreteComponent, element, EcorePackage.eNS_URI, attribute); }
public void undo() { super.undo(); if (appInfoAttributeAdded){ component.getElement().removeAttribute(attributeQName); } }
protected XSDTypeDefinition getEcoreTypeQNameAttribute(XSDConcreteComponent xsdConcreteComponent, String attribute) { Element element = xsdConcreteComponent.getElement(); return element == null ? null : getEcoreTypeQNameAttribute(xsdConcreteComponent, element, EcorePackage.eNS_URI, attribute); }
protected String getEcoreAttribute(XSDConcreteComponent xsdConcreteComponent, String attribute) { if (xsdConcreteComponent == null) { return null; } else { Element element = xsdConcreteComponent.getElement(); return getEcoreAttribute(element, attribute); } }
protected XSDTypeDefinition getEcoreTypeQNameAttribute(XSDConcreteComponent xsdConcreteComponent, String attribute) { Element element = xsdConcreteComponent.getElement(); return element == null ? null : getEcoreTypeQNameAttribute(xsdConcreteComponent, element, EcorePackage.eNS_URI, attribute); }
protected List<XSDTypeDefinition> getEcoreTypeQNamesAttribute(XSDConcreteComponent xsdConcreteComponent, String attribute) { Element element = xsdConcreteComponent.getElement(); return element == null ? Collections.<XSDTypeDefinition>emptyList() : getEcoreTypeQNamesAttribute(xsdConcreteComponent, element, EcorePackage.eNS_URI, attribute); }
protected String getEcoreAttribute(XSDConcreteComponent xsdConcreteComponent, String attribute) { if (xsdConcreteComponent == null) { return null; } else { Element element = xsdConcreteComponent.getElement(); return getEcoreAttribute(element, attribute); } }
public Element getElement() { if (element != null) return element; else if (getSchema() != null) element = getSchema().getElement(); return element; }
public void execute() { try { beginRecording(component.getElement()); super.execute(); namespacePrefix = handleNamespacePrefices(); attributeQName = namespacePrefix + ":" + attribute.getName(); //$NON-NLS-1$ String value = component.getElement().getAttribute(attributeQName); if (value == null) { appInfoAttributeAdded = true; component.getElement().setAttribute(attributeQName, ""); //$NON-NLS-1$ } } finally { endRecording(); } }
@Override public String getURIFragment(EObject eObject) { if (eObject instanceof XSDConcreteComponent) { XSDConcreteComponent xsdConcreteComponent = (XSDConcreteComponent)eObject; Element theElement = xsdConcreteComponent.getElement(); if (theElement != null && theElement.hasAttributeNS(null, XSDConstants.ID_ATTRIBUTE) && theElement.getOwnerDocument().getElementById(theElement.getAttributeNS(null, XSDConstants.ID_ATTRIBUTE)) == theElement) { return theElement.getAttributeNS(null, XSDConstants.ID_ATTRIBUTE); } } return super.getURIFragment(eObject); }
@Override public String getURIFragment(EObject eObject) { if (eObject instanceof XSDConcreteComponent) { XSDConcreteComponent xsdConcreteComponent = (XSDConcreteComponent)eObject; Element theElement = xsdConcreteComponent.getElement(); if (theElement != null && theElement.hasAttributeNS(null, XSDConstants.ID_ATTRIBUTE) && theElement.getOwnerDocument().getElementById(theElement.getAttributeNS(null, XSDConstants.ID_ATTRIBUTE)) == theElement) { return theElement.getAttributeNS(null, XSDConstants.ID_ATTRIBUTE); } } return super.getURIFragment(eObject); }
public String getQName(XSDConcreteComponent relativeToComponent) { String theName = getName(); if (theName != null && relativeToComponent != null) { Element theElement = relativeToComponent.getElement(); if (theElement != null) { String qualifier = XSDConstants.lookupQualifier(theElement, getTargetNamespace()); if (qualifier != null && qualifier.length() != 0) { return qualifier + ":" + theName; } } } return theName; }
public String getQName(XSDConcreteComponent relativeToComponent) { String theName = getName(); if (theName != null && relativeToComponent != null) { Element theElement = relativeToComponent.getElement(); if (theElement != null) { String qualifier = XSDConstants.lookupQualifier(theElement, getTargetNamespace()); if (qualifier != null && qualifier.length() != 0) { return qualifier + ":" + theName; } } } return theName; }
public void execute() { try { beginRecording(component.getElement()); super.execute(); addAnnotationSet(component.getSchema(), extensionsSchemaSpec); formatChild(component.getElement()); } finally { endRecording(); } }
public void execute() { try { beginRecording(component.getElement()); super.execute(); doPreprocessing(); addExtensionNode(); doCustomizedActions(); formatChild(component.getElement()); } finally { endRecording(); } }
public void execute() { try { beginRecording(parent.getElement()); XSDConcreteComponent owner = getOwner(); if (owner != null) { XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle(); newModelGroup = createModelGroup(); particle.setContent(newModelGroup); XSDComplexTypeDefinition ctd = (XSDComplexTypeDefinition) owner; ctd.setContent(particle); } formatChild(parent.getElement()); } finally { endRecording(); } }
public void execute() { try { beginRecording(concreteComponent.getElement()); XSDComponent td = computeComponent(); if (td != null && td instanceof XSDTypeDefinition) { SetBaseTypeCommand command = new SetBaseTypeCommand(concreteComponent, (XSDTypeDefinition) td); command.execute(); } } catch (Exception e) { } finally { endRecording(); } } }