Closed eclipse-ocl-bot closed 3 hours ago
By Ed Willink on Oct 26, 2015 08:05
If your actual purpose is to add documentation, it is easier to do
enum Parameter_kind { serializable }\ {\ / test /\ literal DB_BOOLEAN;\ literal ENUMERATED = 1;\ literal INT8 = 2;\ literal INT16 = 3;\ }
It also works.
By Ed Willink on Oct 26, 2015 08:20
(In reply to Johan Hardy from comment #0)
As a result, it is not possible to add an annotation to a literal.
AS2EcoreDeclarationVisitor only copies Annotations for Annotation/Classifier/Package/TypedElement so EnumerationLiteral is missing. Why not just copy for NamedElement?
By Johan Hardy on Oct 26, 2015 08:48
(In reply to Ed Willink from comment #2)
(In reply to Johan Hardy from comment #0)
As a result, it is not possible to add an annotation to a literal.
AS2EcoreDeclarationVisitor only copies Annotations for Annotation/Classifier/Package/TypedElement so EnumerationLiteral is missing. Why not just copy for NamedElement?
ok probably that /**/ is better. The ticket may be closed (worksforme).
By Ed Willink on Oct 26, 2015 09:22
(In reply to Johan Hardy from comment #3)
ok probably that /**/ is better. The ticket may be closed (worksforme).
It is nonetheless a bug. Fix currently available on branch ewillink/480635. Just need to get past Bug 480644 to release it to master.
By Ed Willink on Oct 29, 2015 03:31
Pushed to master for M3.
| --- | --- | | Bugzilla Link | 480635 | | Status | RESOLVED FIXED | | Importance | P3 normal | | Reported | Oct 26, 2015 07:45 EDT | | Modified | Oct 29, 2015 03:31 EDT | | Reporter | Johan Hardy |
Description
Create a new Ecore, create an Ecore Enumeration. Add literals and annotations. Perform a save in the OCL in Ecore Editor. Open the Ecore Tree Editor ; the annotation does not appear.
enum Parameter_kind { serializable }\ {\ literal DB_BOOLEAN { annotation documentation\ (doc = 'test');\ } \ literal ENUMERATED = 1;\ literal INT8 = 2;\ literal INT16 = 3;\ }
As a result, it is not possible to add an annotation to a literal.