Skip to main content



      Home
Home » Modeling » OCL » Annotated OCL in Ecore model not working in Helios(MDT OCL parser/interpreter and EMF/JET code generation)
Annotated OCL in Ecore model not working in Helios [message #662649] Thu, 31 March 2011 08:40 Go to next message
Eclipse UserFriend
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. Sad
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 08:42] by Moderator

Re: Annotated OCL in Ecore model not working in Helios [message #662726 is a reply to message #662649] Thu, 31 March 2011 12:08 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: Annotated OCL in Ecore model not working in Helios [message #663031 is a reply to message #662649] Sat, 02 April 2011 09:30 Go to previous message
Eclipse UserFriend
Thank you for the answer, Edward.
Previous Topic:Adding New function on Collection type
Next Topic:Evaluate Ecore Instances programatically
Goto Forum:
  


Current Time: Wed Jul 23 08:51:28 EDT 2025

Powered by FUDForum. Page generated in 0.40956 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top