Annotated OCL in Ecore model not working in Helios [message #662649] |
Thu, 31 March 2011 12:40 |
Bob Missing name Messages: 12 Registered: October 2009 |
Junior Member |
|
|
Hello folks,
I have no idea where to post this topic, since there is a lot of subforums in Eclipse's forum. Sorry if I made the wrong decision.
I have a project in which I put EAnnotations in the elements of my Ecore model and I use a Java Emitter Template that I copied from this tutorial here.
By doing such thing, I can write my OCL constraints in the Ecore model instead of hard-coding, which is pretty convenient.
In Eclipse Galileo, the template stopped working and I had to follow this thread to fix it. The solution was to rename one of the files.
Now, in Eclipse Helios the template stopped working again.
When I try to generate the model code from the ecore genmodel, I get some files with no classes inside.
What should I do?
[And, by the way, I have no idea how the template works, I'm just a user of it.]
Thanks.
[Updated on: Thu, 31 March 2011 12:42] Report message to a moderator
|
|
|
Re: Annotated OCL in Ecore model not working in Helios [message #662726 is a reply to message #662649] |
Thu, 31 March 2011 16:08 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi Bob
This is a pretty appropriate newsgroup.
You have identified another reason why the earlier OCL Validation
attempts were so unsatisfactory; they rely on custom JET templates that
have a very fragile interaction with the master templates.
Helios introduced a much better way to do this, and it works on
Dynamic/Reflective models as well as genmodeled models.
If you use the OCLinEcore Xtext editor in Helios you can edit OCL
constraints within a textual view of your Ecore model. This gives you
syntax checking and hides all the EAnnotation noise.
The Indigo release adds semantic OCL checking and more Xtext goodies.
See the OCLinEcore tutorial in the Helios OCL Help.
Regards
Ed Willink
On 31/03/2011 13:41, Bob wrote:
> Hello folks,
>
> I have no idea where to post this topic, since there is a lot of
> subforums in Eclipse's forum. Sorry if I made the wrong decision.
>
> I have a project in which I put EAnnotations in the elements of my
> Ecore model and I use a Java Emitter Template that I copied from this
> tutorial
> http://www.eclipse.org/articles/article.php?file=Article-EMF -Codegen-with-OCL/index.html
> By doing such thing, I can write my OCL constraints in the Ecore model
> instead of hard-coding, which is pretty convenient.
>
> In Eclipse Galileo, the template stopped working and I had to follow
> http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg3 2588.html
> to fix it. The
> http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg3 3275.html
> was to rename one of the files.
>
> Now, in Eclipse Helios the template stopped working again.
> When I try to generate de model code from the ecore genmodel, I get
> some files with no classes inside. :(
> What should I do?
>
> [And, by the way, I have no idea how the template works, I'm just a
> user of it.]
>
> Thanks.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03465 seconds