|Re: Default value specified in OCL for properties [message #1721786 is a reply to message #1721727]
||Sat, 30 January 2016 13:30
| Klaas Gadeyne
Registered: July 2009
Sebastien GABEL wrote on Fri, 29 January 2016 08:54
Does anymore know if it's still possible to use OCL expressions to initialize default value for (derived) properties coming from a profile ?
Do you refer to the specification of the initialValue, or to the evaluation of the expression you specify in a model to which your profile is applied?
The former is possible, although the context is not correctly set (yet?) the first time you type an expression. Don't know if there is a bug report about this in papyrus. You will/should note that, when you revisit the expression, that the expression parses correctly.
The latter is only possible if you use a static profile, IIRC. This is https://bugs.eclipse.org/bugs/show_bug.cgi?id=417845
After reading the "OCL in UML (using Papyrus)" chapter of the OCL documentation (Cf. section Property Initializers), I tried this from Papyrus Mars SR1 and Neon (Nighlty build) without success. Nothing particular into the Error log.
The documentation applies only to Papyrus Luna, in the newest versions, for example, it is no more possible to specify the context through the property pages.
Any clarification or any status on this point are welcome.
The context should be set 'automatically', but it (at least on my mac) appears it is not yet set correctly the first time.
Powered by FUDForum
. Page generated in 0.02042 seconds