for (Iterator itr = atts.iterator(); itr.hasNext();) { XSDAttributeDeclaration attribute = (XSDAttributeDeclaration) itr.next(); if ( attribute.isAttributeDeclarationReference() ) { attribute = attribute.getResolvedAttributeDeclaration();
if (attribute.isAttributeDeclarationReference()) { attribute = attribute.getResolvedAttributeDeclaration();
public void visitAttributeDeclaration(XSDAttributeDeclaration attr) { if (attr.isAttributeDeclarationReference()) { thingsWeNeedToListenTo.add(attr); thingsWeNeedToListenTo.add(attr.getResolvedAttributeDeclaration()); concreteComponentList.add(attr); } else { concreteComponentList.add(attr.getResolvedAttributeDeclaration()); thingsWeNeedToListenTo.add(attr.getResolvedAttributeDeclaration()); } } }
public Object caseXSDAttributeDeclaration(XSDAttributeDeclaration attributeDeclaration) { XSDConcreteComponent target = null; if (attributeDeclaration.isAttributeDeclarationReference()) { target = attributeDeclaration.getResolvedAttributeDeclaration(); } else if (attributeDeclaration.getAnonymousTypeDefinition() == null) { target = attributeDeclaration.getTypeDefinition(); // Avoid navigating to built in data types. if (isFromSchemaForSchema(target)) { target = null; } } return target; }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); XSDAttributeDeclaration ad = (XSDAttributeDeclaration) object; if (!ad.isAttributeDeclarationReference()) { // annotation newChildDescriptors.add(createChildParameter(xsdPackage.getXSDAttributeDeclaration_Annotation(), xsdFactory.createXSDAnnotation())); // atomic, list, and union simple type definitions addSimpleTypeDefinitionChildParameters(newChildDescriptors, ad, xsdPackage.getXSDAttributeDeclaration_AnonymousTypeDefinition(), true, true, true); } } }
if (((XSDAttributeDeclaration) selected).isAttributeDeclarationReference())
XSDAttributeDeclaration attrDecl = attrUse.getContent(); if (attrDecl != null && attrDecl.isAttributeDeclarationReference())
XSDAttributeDeclaration attrDecl = attrUse.getContent(); if (attrDecl != null && attrDecl.isAttributeDeclarationReference())
if (xsdAttributeDeclaration.isAttributeDeclarationReference())
public Image getImage() { XSDAttributeDeclaration xsdAttributeDeclaration = getXSDAttributeDeclaration(); // don't want the resolved attribute if (xsdAttributeDeclaration.isAttributeDeclarationReference()) { if (isReadOnly()) { return XSDEditorPlugin.getPlugin().getIcon("obj16/XSDAttributeRefdis.gif"); } return XSDEditorPlugin.getXSDImage("icons/XSDAttributeRef.gif"); //$NON-NLS-1$ } else { if (isReadOnly()) { return XSDEditorPlugin.getPlugin().getIcon("obj16/XSDAttributedis.gif"); } return XSDEditorPlugin.getXSDImage("icons/XSDAttribute.gif"); //$NON-NLS-1$ } }
@Override public void setPropertyValue(Object o, Object value) { XSDAttributeDeclaration xsdAttributeDeclaration = (XSDAttributeDeclaration)o; if (xsdAttributeDeclaration.isAttributeDeclarationReference()) { XSDAttributeDeclaration newResolvedAttributeDeclaration = xsdAttributeDeclaration.resolveAttributeDeclaration(xsdAttributeDeclaration.getTargetNamespace(), (String)value); EditingDomain editingDomain = getEditingDomain(xsdAttributeDeclaration); if (editingDomain == null) { xsdAttributeDeclaration.setResolvedAttributeDeclaration(newResolvedAttributeDeclaration); } else { editingDomain.getCommandStack().execute (SetCommand.create (editingDomain, xsdAttributeDeclaration, xsdPackage.getXSDAttributeDeclaration_ResolvedAttributeDeclaration(), newResolvedAttributeDeclaration)); } } else { super.setPropertyValue(o, value); } } });
isAttributeReference = ((XSDAttributeDeclaration)input).isAttributeDeclarationReference(); XSDTypeDefinition typeDef = xsdAttribute.getTypeDefinition(); boolean isAnonymous = xsdAttribute.getAnonymousTypeDefinition() != null;
((XSDElementDeclaration) child).isElementDeclarationReference()) || (child instanceof XSDAttributeDeclaration && ((XSDAttributeDeclaration) child).isAttributeDeclarationReference()) || (child instanceof XSDModelGroupDefinition && ((XSDModelGroupDefinition) child).isModelGroupDefinitionReference()) ||