/** * 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 NOT */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { // super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (EcorePackage.eINSTANCE.getEAnnotation_Details(), EcoreFactory.eINSTANCE.create(EcorePackage.eINSTANCE.getEStringToStringMapEntry()))); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> */ public EAnnotation addEAnnotation(String source) { EAnnotation eAnnotation = this.getEAnnotation(source); if (eAnnotation == null) { eAnnotation = (EAnnotation)EcoreFactory.eINSTANCE.create(EcorePackage.eINSTANCE.getEAnnotation()); eAnnotation.setSource(source); this.getEAnnotations().add(eAnnotation); } return eAnnotation; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> */ public void addEAnnotationDetail(EAnnotation eAnnotation, String key, String value) { if (eAnnotation != null) { EStringToStringMapEntryImpl mapEntry = (EStringToStringMapEntryImpl)EcoreFactory.eINSTANCE.create(EcorePackage.eINSTANCE.getEStringToStringMapEntry()); mapEntry.setTypedKey(key); mapEntry.setTypedValue(value); eAnnotation.getDetails().add(mapEntry); } }