| --- | --- |
| Bugzilla Link | 570705 |
| Status | NEW |
| Importance | P3 normal |
| Reported | Jan 28, 2021 01:34 EDT |
| Modified | Jan 28, 2021 01:48 EDT |
| See also | 570598 |
| Reporter | Ed Willink |
Description
The CamelCase genmodel option facilitates a corruption of model element names so that the names in the generated Ecore do not correspond to those on the user;s UML model. If the UML model has textual contributions such as OCL bodoes for constraints, these textual bodies are not rewritten to use the corrupted names. This was worked around by the addition of an "originalName" EAnnotation in Bug 405061 enabling the Pivot OCL to support static profiles.
The EAnnotation was not added to the Classic OCL causing much pain for a user in Bug 570598. Changing the Ecore support of Classic OCL to augment every ENamedElement.getName() call is also painful and questionable for derivations of Classic OCL such as QVTo.
In the absence of a text body rewrite, the use of CamelCase conversion is incompatible with textual bodies.
Therefore UML GenModel should generate a warning whenever CamelCase is selected in conjunction with text bodies.
(THis will give a warning for UML.uml where the very troublesome misspelling of the "UML" package as "uml" will be detected.)
| --- | --- | | Bugzilla Link | 570705 | | Status | NEW | | Importance | P3 normal | | Reported | Jan 28, 2021 01:34 EDT | | Modified | Jan 28, 2021 01:48 EDT | | See also | 570598 | | Reporter | Ed Willink |
Description
The CamelCase genmodel option facilitates a corruption of model element names so that the names in the generated Ecore do not correspond to those on the user;s UML model. If the UML model has textual contributions such as OCL bodoes for constraints, these textual bodies are not rewritten to use the corrupted names. This was worked around by the addition of an "originalName" EAnnotation in Bug 405061 enabling the Pivot OCL to support static profiles.
The EAnnotation was not added to the Classic OCL causing much pain for a user in Bug 570598. Changing the Ecore support of Classic OCL to augment every ENamedElement.getName() call is also painful and questionable for derivations of Classic OCL such as QVTo.
In the absence of a text body rewrite, the use of CamelCase conversion is incompatible with textual bodies.
Therefore UML GenModel should generate a warning whenever CamelCase is selected in conjunction with text bodies.
(THis will give a warning for UML.uml where the very troublesome misspelling of the "UML" package as "uml" will be detected.)