Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Adding OCL in Ecore Model
Adding OCL in Ecore Model [message #50035] Thu, 31 January 2008 07:55 Go to next message
Mark Melia is currently offline Mark Melia
Messages: 142
Registered: July 2009
Senior Member
Hi all,

I had this working and now cant get it working again, I want to be able to
add OCL constraints on my models as in figure 1
http://www.eclipse.org/articles/article.php?file=Article-EMF -Codegen-with-OCL/index.html
but cant get it working again.

I installed a new eclipse, installed the OCL from the europa update site -
this gets the interactive OCL console working but no OCL in the ecore
model. I am very confused???

Anybody know the right way to get this functionality installed.

Thanks,
Mark
Re: Adding OCL in Ecore Model [message #50065 is a reply to message #50035] Thu, 31 January 2008 08:50 Go to previous messageGo to next message
Eclipse User
Originally posted by: cdamus.ca.ibm.com

Hi, Mark,

What, specifically, is going wrong? Do you see incorrect code being
generated from your custom templates (note that there have been numerous
changes in the base EMF templates since this article was written). Are you
getting OCL parsing problems? Exceptions? Any messages in the log? What
does debugging show?

Note that the example illustrated in that article has not and will never be
incorporated into OCL and/or EMF in the form in which you see it (is that
what you were expecting?) There is work under way to provide hooks in the
implementations of EStructuralFeatures and EOperations that OCL could
eventually plug in to.

Cheers,

Christian


Mark Melia wrote:

> Hi all,
>
> I had this working and now cant get it working again, I want to be able to
> add OCL constraints on my models as in figure 1
>
http://www.eclipse.org/articles/article.php?file=Article-EMF -Codegen-with-OCL/index.html
> but cant get it working again.
>
> I installed a new eclipse, installed the OCL from the europa update site -
> this gets the interactive OCL console working but no OCL in the ecore
> model. I am very confused???
>
> Anybody know the right way to get this functionality installed.
>
> Thanks,
> Mark
Re: Adding OCL in Ecore Model [message #50095 is a reply to message #50065] Thu, 31 January 2008 09:55 Go to previous messageGo to next message
Mark Melia is currently offline Mark Melia
Messages: 142
Registered: July 2009
Senior Member
Hi Christian,

I was expecting the form as illustrated in the example. I thought that you
could add OCL directly to the ecore model as shown (using something like a
right click on a model element and adding OCL). So if you have an Ecore
model where do you add constraints?

Thanks for your help,
Mark


Christian W. Damus wrote:

> Hi, Mark,

> What, specifically, is going wrong? Do you see incorrect code being
> generated from your custom templates (note that there have been numerous
> changes in the base EMF templates since this article was written). Are you
> getting OCL parsing problems? Exceptions? Any messages in the log? What
> does debugging show?

> Note that the example illustrated in that article has not and will never be
> incorporated into OCL and/or EMF in the form in which you see it (is that
> what you were expecting?) There is work under way to provide hooks in the
> implementations of EStructuralFeatures and EOperations that OCL could
> eventually plug in to.

> Cheers,

> Christian


> Mark Melia wrote:

>> Hi all,
>>
>> I had this working and now cant get it working again, I want to be able to
>> add OCL constraints on my models as in figure 1
>>
>
http://www.eclipse.org/articles/article.php?file=Article-EMF -Codegen-with-OCL/index.html
>> but cant get it working again.
>>
>> I installed a new eclipse, installed the OCL from the europa update site -
>> this gets the interactive OCL console working but no OCL in the ecore
>> model. I am very confused???
>>
>> Anybody know the right way to get this functionality installed.
>>
>> Thanks,
>> Mark
Re: Adding OCL in Ecore Model [message #50124 is a reply to message #50095] Thu, 31 January 2008 10:14 Go to previous messageGo to next message
Eclipse User
Originally posted by: cdamus.ca.ibm.com

Hi, Mark,

Do you mean, that the Ecore Editor no longer allows you to add EAnnotations?

You can, certainly, add these OCL annotations to an Ecore model, but neither
EMF nor OCL will know what to do with them.

The code-generation extensions illustrated in the article are not packaged
in the EMF SDK nor the OCL SDK. They are an example that you implement
yourself, following the article, using EMF's dynamic templates support.
The article does link to a downloadable ZIP of the example projects; these
work with EMF 2.3 and OCL 1.1; I have not verified that they still work
with EMF 2.4 and OCL 1.2, but I don't see why they wouldn't.

Cheers,

Christian


Mark Melia wrote:

> Hi Christian,
>
> I was expecting the form as illustrated in the example. I thought that you
> could add OCL directly to the ecore model as shown (using something like a
> right click on a model element and adding OCL). So if you have an Ecore
> model where do you add constraints?
>
> Thanks for your help,
> Mark

-----8<-----
Re: Adding OCL in Ecore Model [message #50147 is a reply to message #50124] Thu, 31 January 2008 10:37 Go to previous message
Mark Melia is currently offline Mark Melia
Messages: 142
Registered: July 2009
Senior Member
Hi Christian,

Now I get it - thanks for your help!

Mark
Previous Topic:[OCL Tools] Downloads
Next Topic:Getting Started
Goto Forum:
  


Current Time: Thu Jul 24 16:12:47 EDT 2014

Powered by FUDForum. Page generated in 0.02389 seconds