|
|
|
|
|
|
|
Re: Generating Java code for OCL constraints [message #1219538 is a reply to message #1031416] |
Wed, 04 December 2013 09:01   |
Eclipse User |
|
|
|
Hello,
I am also trying to generate Java code from an ecore with OCL constraints, having some problems about that.
Generating Java code from a basic ecore with OCL constraints works fine at first. However, when the ecore contains several packages, the generated code does not include any delegate code for OCL constraints. Since it seems that the latest OCL version fixes this problem, I have updated Kepler to use OCL 4.2.0M3, but no success.
Furthermore, once you generate Java code for an ecore with nested packages, it seems that OCL constraints are always ignored in the following code generations, even for very simple ecores (without nested packages).
Any help will be welcome.
Thanks,
Conchi
PD: an example of the kind of ecore I want to develop is attached.
Attachment: My.ecore
(Size: 3.14KB, Downloaded 438 times)
|
|
|
Re: Generating Java code for OCL constraints [message #1219610 is a reply to message #1219538] |
Wed, 04 December 2013 17:08   |
Eclipse User |
|
|
|
Hi
Java CG for multiple package models was fixed a few months ago.
Your example works fine for me with Use Delegates true/false.
Your other comments are too vague for me to react to. For some changes
you need to exit and restart the genmodel editor since the OCL code is
generated as an in-memory model update.
Regards
Ed Willink
On 04/12/2013 14:59, Conchi Sanz wrote:
> Hello,
>
>
> I am also trying to generate Java code from an ecore with OCL constraints, having some problems about that.
>
> Generating Java code from a basic ecore with OCL constraints works fine at first. However, when the ecore contains several packages, the generated code does not include any delegate code for OCL constraints. Since it seems that the latest OCL version fixes this problem, I have updated Kepler to use OCL 4.2.0M3, but no success.
>
> Furthermore, once you generate Java code for an ecore with nested packages, it seems that OCL constraints are always ignored in the following code generations, even for very simple ecores (without nested packages).
>
>
> Any help will be welcome.
>
> Thanks,
> Conchi
>
> PD: an example of the kind of ecore I want to develop is attached.
|
|
|
|
Powered by
FUDForum. Page generated in 0.06377 seconds