protected EAnnotation createEmbedsReferenceAnnotation() { EAnnotation embedsReferenceAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); embedsReferenceAnnotation.setSource("embedsreference"); return embedsReferenceAnnotation; }
protected EAnnotation createDbEmbedReferenceAnnotation() { EAnnotation embedsReferenceAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); embedsReferenceAnnotation.setSource("dbembed"); return embedsReferenceAnnotation; }
protected EAnnotation createHiddenAnnotation() { EAnnotation hidden = EcoreFactory.eINSTANCE.createEAnnotation(); hidden.setSource("hidden"); return hidden; }
@Deprecated protected EAnnotation createNoLazyLoadAnnotation() { EAnnotation hidden = EcoreFactory.eINSTANCE.createEAnnotation(); hidden.setSource("nolazyload"); return hidden; }
private EAnnotation createInverseAnnotation() { EAnnotation eAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); eAnnotation.setSource("inverse"); return eAnnotation; }
private EAnnotation createHiddenAnnotation() { EAnnotation hiddenAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); hiddenAnnotation.setSource("hidden"); return hiddenAnnotation; }
protected EAnnotation createNoDatabaseAnnotation() { EAnnotation embedsReferenceAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); embedsReferenceAnnotation.setSource("nodatabase"); return embedsReferenceAnnotation; }
protected EAnnotation createUniqueAnnotation() { EAnnotation unique = EcoreFactory.eINSTANCE.createEAnnotation(); unique.setSource("unique"); return unique; }
private EAnnotation createWrappedAnnotation() { EAnnotation wrappedAnnotation = eFactory.createEAnnotation(); wrappedAnnotation.setSource("wrapped"); return wrappedAnnotation; }
private EAnnotation createAsStringAnnotation() { EAnnotation asStringAnnotation = eFactory.createEAnnotation(); asStringAnnotation.setSource("asstring"); return asStringAnnotation; }
private EAnnotation createTwoDimensionalArrayAnnotation() { EAnnotation asStringAnnotation = eFactory.createEAnnotation(); asStringAnnotation.setSource("twodimensionalarray"); return asStringAnnotation; }
public void addIndex(EStructuralFeature eStructuralFeature) { for (EAnnotation eAnnotation : eStructuralFeature.getEAnnotations()) { if (eAnnotation.getSource().equals("singleindex")) { throw new RuntimeException(eStructuralFeature + " already has an index"); } } changes.add(new AddIndexChange(this, eStructuralFeature)); EAnnotation index = EcoreFactory.eINSTANCE.createEAnnotation(); index.setSource("singleindex"); eStructuralFeature.getEAnnotations().add(index); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (EcorePackage.Literals.EMODEL_ELEMENT__EANNOTATIONS, EcoreFactory.eINSTANCE.createEAnnotation())); }
public boolean isApplicable(EStructuralFeature eStructuralFeature) { Method method = PropertySwitch.ENTRY_VALIDATORS.get(eClass); EMap<String, String> details = EcoreFactory.eINSTANCE.createEAnnotation().getDetails(); details.put(eStructuralFeature.getName(), null); try { return (Boolean)method.invoke(extendedMetaData, eNamedElement, details.get(0), null, null); } catch (Exception exception) { throw new RuntimeException(exception); } }
/** * Creates an annotation with the specified source on the specified model * element. * * @param eModelElement * The model element on which to create the annotation. * @param source * The source for the new annotation. * @return A new annotation. */ public static EAnnotation createEAnnotation(EModelElement eModelElement, String source) { EAnnotation eAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); eAnnotation.setEModelElement(eModelElement); eAnnotation.setSource(source); return eAnnotation; }
/** * Creates an annotation with the specified source on the specified model * element. * * @param eModelElement * The model element on which to create the annotation. * @param source * The source for the new annotation. * @return A new annotation. */ public static EAnnotation createEAnnotation(EModelElement eModelElement, String source) { EAnnotation eAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); eAnnotation.setEModelElement(eModelElement); eAnnotation.setSource(source); return eAnnotation; }
/** * Marks the specified operations as being collection iterators (as distinct * from ordinary operations). * * @param operations operations to designate as iterators */ public static void stereotypeAsIterator(Collection<EOperation> operations) { for (EOperation oper : operations) { EAnnotation ann = org.eclipse.emf.ecore.EcoreFactory.eINSTANCE.createEAnnotation(); ann.setSource(Environment.OCL_NAMESPACE_URI); ann.getDetails().put("keywords", "iterator"); //$NON-NLS-1$ //$NON-NLS-2$ oper.getEAnnotations().add(ann); } }
/** * Annotate given {@link EModelElement} with smooks anntation with given key * and value * * @param element * @param key * @param value */ private static void annotate(EModelElement element, String key, String value) { if (!StringUtils.isEmpty(value)) { EAnnotation annotation = element .getEAnnotation(SmooksMetadata.ANNOTATION_TYPE); if (annotation == null) { annotation = EcoreFactory.eINSTANCE.createEAnnotation(); annotation.setSource(SmooksMetadata.ANNOTATION_TYPE); element.getEAnnotations().add(annotation); } annotation.getDetails().put(key, value); } }
/** * Annotate given {@link EModelElement} with smooks anntation with given key * and value * * @param element * @param key * @param value */ private static void annotate(EModelElement element, String key, String value) { if (!StringUtils.isEmpty(value)) { EAnnotation annotation = element .getEAnnotation(SmooksMetadata.ANNOTATION_TYPE); if (annotation == null) { annotation = EcoreFactory.eINSTANCE.createEAnnotation(); annotation.setSource(SmooksMetadata.ANNOTATION_TYPE); element.getEAnnotations().add(annotation); } annotation.getDetails().put(key, value); } }
/** * Creates the shadow class to contain features that an Ecore classifier * cannot contain for itself. * * @param classifier an Ecore classifier * * @return the class containing its features */ public static EClass createShadowClass(EClassifier classifier) { // the features may have invalid characters in their names EClass result = org.eclipse.emf.ecore.EcoreFactory.eINSTANCE.createEClass(); result.setName(classifier.getName() + "_Class"); //$NON-NLS-1$ EAnnotation ann = org.eclipse.emf.ecore.EcoreFactory.eINSTANCE.createEAnnotation(); ann.setSource(Environment.OCL_NAMESPACE_URI); ann.getReferences().add(classifier); result.getEAnnotations().add(ann); return result; }