References to enumerations defined in a profile [message #1844153] |
Fri, 03 September 2021 09:50 |
Yves BERNARD Messages: 146 Registered: July 2014 |
Senior Member |
|
|
Dear all,
The transformation I'm working on uses as input a UML model on which profiles have been applied.
Checking stereotypes and tag values using the EMF utilities works fine, but I'm struggling in testing some tag values against literals defined as part of on of those profiles. For instance SysML defines the FlowDirectionKind enumeration. How can I refers to this enumeration ?
I tried defining a "SysML" metamodel in the launch configuration pointing to the SysML.profile.uml I have, so that I can refers to: SysML!FlowDirectionKind, but I get the following error at run time:
org.eclipse.uml.internal.impl.ProfileImpl cannot be cast to org.eclipse.emf.ecore.EPackage
Yves
|
|
|
Re: References to enumerations defined in a profile [message #1844155 is a reply to message #1844153] |
Fri, 03 September 2021 10:40 |
|
ATL uses untyped enum literals in its code, e.g.:
publicAttribute.visibility = #public
At runtime, these ATL enum values are converted from/to EMF EEnumLiteral instances. This conversion is performed on assignment ('<-'), comparison ('='), and when passed as a method argument.
Cheers,
Dennis
|
|
|
|
Powered by
FUDForum. Page generated in 0.02520 seconds