Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 12:40 Go to next message
Bob Missing name is currently offline Bob Missing nameFriend
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. 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 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 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
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.
Re: Annotated OCL in Ecore model not working in Helios [message #663031 is a reply to message #662649] Sat, 02 April 2011 13:30 Go to previous message
Bob Missing name is currently offline Bob Missing nameFriend
Messages: 12
Registered: October 2009
Junior Member
Thank you for the answer, Edward.
Previous Topic:Adding New function on Collection type
Next Topic:Evaluate Ecore Instances programatically
Goto Forum:
  


Current Time: Thu Apr 25 13:10:55 GMT 2024

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

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

Back to the top