| Summary: | Code Gen Annotations Model encoding. | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMFT | Reporter: | Assen Sharlandjiev <assen.sharlandjiev> | ||||||||
| Component: | Texo | Assignee: | Martin Taal <mtaal> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | ||||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | Macintosh | ||||||||||
| OS: | Mac OS X | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 191562 [details]
Sample ECore model UTF-8 encoding
Created attachment 191563 [details]
Generated Annotations Model, ASCII Encoded
Created attachment 191572 [details]
Patch for AnnotationModelGenerator
Hi Martin, Please review the attached patch. It should solve the problem. If it is okay, please commit it and run a build. Thank you. Hi Assen, Your patch has been applied and new build has been published. Thanks! gr. Martin |
Dear Martin, Consider an Ecore model with UTF-8 encoding, containing EEnum with literals in cyrilic. When I generate Code Gen Annotated Model from this ECore model, the resulting .annotationsmodel has ASCII encoding. It appears that the Annotated Model generator does not respect the encoding of the source ECore model. Further, I am not able to edit the generated annotations model with the Annotationsmodel Model Editor, as this results in exception: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x{2}) was found in the value of attribute "{1}" and element is "1d". at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397) .... Caused by: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x{2}) was found in the value of attribute "{1}" and element is "1d". Would you please fix the annotations model generator to respect the encoding defined in the ECore model, and use the same in the generated annotations model. Thank you in advance.