public static XSDAnnotation createAnnotation(Node node) { if (XSDConstants.nodeType(node) == XSDConstants.ANNOTATION_ELEMENT) { XSDAnnotation xsdAnnotation = XSDFactory.eINSTANCE.createXSDAnnotation(); xsdAnnotation.setElement((Element)node); return xsdAnnotation; } return null; }
public static XSDAnnotation createAnnotation(Node node) { if (XSDConstants.nodeType(node) == XSDConstants.ANNOTATION_ELEMENT) { XSDAnnotation xsdAnnotation = XSDFactory.eINSTANCE.createXSDAnnotation(); xsdAnnotation.setElement((Element)node); return xsdAnnotation; } return null; }
/** * 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); // annotation newChildDescriptors.add(createChildParameter(xsdPackage.getXSDWildcard_Annotation(), xsdFactory.createXSDAnnotation())); } }
/** * 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); // annotation newChildDescriptors.add(createChildParameter(xsdPackage.getXSDInclude_Annotation(), xsdFactory.createXSDAnnotation())); } }
/** * 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); // annotation newChildDescriptors.add(createChildParameter(xsdPackage.getXSDFacet_Annotation(), xsdFactory.createXSDAnnotation())); } }
/** * 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); // annotation newChildDescriptors.add(createChildParameter(xsdPackage.getXSDXPathDefinition_Annotation(), xsdFactory.createXSDAnnotation())); } }
/** * 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); // annotation newChildDescriptors.add(createChildParameter(xsdPackage.getXSDImport_Annotation(), xsdFactory.createXSDAnnotation())); } }
/** * 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); // annotation newChildDescriptors.add(createChildParameter(xsdPackage.getXSDNotationDeclaration_Annotation(), xsdFactory.createXSDAnnotation())); } }
if (xsdComponent instanceof XSDTypeDefinition) xsdAnnotation = XSDFactory.eINSTANCE.createXSDAnnotation(); ((XSDTypeDefinition)xsdComponent).setAnnotation(xsdAnnotation); applicationInformation = xsdAnnotation.createApplicationInformation(EcorePackage.eNS_URI);
/** * 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); } } }
@Override public XSDConcreteComponent cloneConcreteComponent(boolean deep, boolean shareDOM) { XSDAnnotationImpl clonedAnnotation = (XSDAnnotationImpl)getXSDFactory().createXSDAnnotation(); clonedAnnotation.isReconciling = true; if (shareDOM) { Element element = getElement(); if (element != null) { clonedAnnotation.setElement(element); } clonedAnnotation.getApplicationInformation().addAll(getApplicationInformation()); clonedAnnotation.getUserInformation().addAll(getUserInformation()); clonedAnnotation.getAttributes().addAll(getAttributes()); } clonedAnnotation.isReconciling = shareDOM; return clonedAnnotation; } }
/** * 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); XSDModelGroupDefinition mgd = (XSDModelGroupDefinition) object; if (!mgd.isModelGroupDefinitionReference()) { // annotation newChildDescriptors.add(createChildParameter(xsdPackage.getXSDModelGroupDefinition_Annotation(), xsdFactory.createXSDAnnotation())); // all, choice, and sequence model groups addModelGroupChildParameters(newChildDescriptors, xsdPackage.getXSDModelGroupDefinition_ModelGroup(), true, false); } } }
@Override public XSDConcreteComponent cloneConcreteComponent(boolean deep, boolean shareDOM) { XSDAnnotationImpl clonedAnnotation = (XSDAnnotationImpl)getXSDFactory().createXSDAnnotation(); clonedAnnotation.isReconciling = true; if (shareDOM) { Element element = getElement(); if (element != null) { clonedAnnotation.setElement(element); } clonedAnnotation.getApplicationInformation().addAll(getApplicationInformation()); clonedAnnotation.getUserInformation().addAll(getUserInformation()); clonedAnnotation.getAttributes().addAll(getAttributes()); } clonedAnnotation.isReconciling = shareDOM; return clonedAnnotation; } }
/** * 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); // annotation newChildDescriptors.add(createChildParameter(xsdPackage.getXSDIdentityConstraintDefinition_Annotation(), xsdFactory.createXSDAnnotation())); // selector xpath XSDXPathDefinition xpd = xsdFactory.createXSDXPathDefinition(); xpd.setVariety(XSDXPathVariety.SELECTOR_LITERAL); xpd.setValue(""); newChildDescriptors.add(createChildParameter(xsdPackage.getXSDIdentityConstraintDefinition_Selector(), xpd)); // field xpath xpd = xsdFactory.createXSDXPathDefinition(); xpd.setVariety(XSDXPathVariety.FIELD_LITERAL); xpd.setValue(""); newChildDescriptors.add(createChildParameter(xsdPackage.getXSDIdentityConstraintDefinition_Fields(), xpd)); } }
/** * 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); XSDRedefine r = (XSDRedefine) object; // annotation newChildDescriptors.add(createChildParameter(xsdPackage.getXSDRedefine_Contents(), xsdFactory.createXSDAnnotation())); // model group definition newChildDescriptors.add(createChildParameter(xsdPackage.getXSDRedefine_Contents(), createModelGroupDefinition(r))); // attribute group definition newChildDescriptors.add(createChildParameter(xsdPackage.getXSDRedefine_Contents(), createAttributeGroupDefinition(r))); // atomic, list, and union simple type definitions addSimpleTypeDefinitionChildParameters(newChildDescriptors, r, xsdPackage.getXSDRedefine_Contents(), true, true, true); // complex type definition newChildDescriptors.add(createChildParameter(xsdPackage.getXSDRedefine_Contents(), createComplexTypeDefinition(r))); } }
newChildDescriptors.add(createChildParameter(schemaContents, xsdFactory.createXSDAnnotation()));
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDTypeDefinition_Annotation(), xsdFactory.createXSDAnnotation())); newChildDescriptors.add(createChildParameter(xsdPackage.getXSDTypeDefinition_DerivationAnnotation(), xsdFactory.createXSDAnnotation()));
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDModelGroup_Annotation(), xsdFactory.createXSDAnnotation()));
(createChildParameter (xsdPackage.getXSDAttributeGroupDefinition_Annotation(), xsdFactory.createXSDAnnotation()));
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDElementDeclaration_Annotation(), xsdFactory.createXSDAnnotation()));