Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Include OCL restrictions in the EMF MetaModel
Include OCL restrictions in the EMF MetaModel [message #69496] Wed, 01 April 2009 08:10 Go to next message
Marc Mising name is currently offline Marc Mising nameFriend
Messages: 193
Registered: July 2009
Location: Valencia, Spain
Senior Member
Hi,

I see there exists an article that explains how to insert restrictions
OCL in the EMF MetaModels. The article is this one:
http://www.eclipse.org/articles/Article-EMF-Codegen-with-OCL /

But it works only in Eclipse Europa, tha uses a different version of EMF
than Eclipse Ganymede, so this article is not valid now.

Anybody know how to insert restrictions in the MetaModel?

I have seen a new article in the eclipse wiki
( http://wiki.eclipse.org/EMF/Validation/Recipes#Recipe:_HowTo _use_the_Eclipse_Validation_Framework_with_OCL_constraints_d efined_in_a_separate_file
), but it's not the same I want. This article explains how to add
restrictions in a separated OCL file, and references this file throught
an Extension in the plugin.xml

Thanks.
Marc
Re: Include OCL restrictions in the EMF MetaModel [message #69516 is a reply to message #69496] Wed, 01 April 2009 19:30 Go to previous messageGo to next message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
Hi Marc,

I believe that the associated JET templates must be tailored to make the
example work in Ganymede and Galileo releases.

I encourage you to send a new enhancement request
( https://bugs.eclipse.org/bugs/enter_bug.cgi?product=MDT& bug_severity=enhancement)
so that it could be considered and planned by the OCL team ;)

Cheers,
Adolfo.


Marc escribió:
> Hi,
>
> I see there exists an article that explains how to insert restrictions
> OCL in the EMF MetaModels. The article is this one:
> http://www.eclipse.org/articles/Article-EMF-Codegen-with-OCL /
>
> But it works only in Eclipse Europa, tha uses a different version of EMF
> than Eclipse Ganymede, so this article is not valid now.
>
> Anybody know how to insert restrictions in the MetaModel?
>
> I have seen a new article in the eclipse wiki
> ( http://wiki.eclipse.org/EMF/Validation/Recipes#Recipe:_HowTo _use_the_Eclipse_Validation_Framework_with_OCL_constraints_d efined_in_a_separate_file
> ), but it's not the same I want. This article explains how to add
> restrictions in a separated OCL file, and references this file throught
> an Extension in the plugin.xml
>
> Thanks.
> Marc
Re: Include OCL restrictions in the EMF MetaModel [message #69553 is a reply to message #69516] Thu, 02 April 2009 14:55 Go to previous messageGo to next message
Marc Mising name is currently offline Marc Mising nameFriend
Messages: 193
Registered: July 2009
Location: Valencia, Spain
Senior Member
Hi Adolfo, I have sent the bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=270974

I try these templates in Eclipse Ganymede, and no code is generated in
the model. The classes are empty.

In Eclipse Europa, the templates work ok.

Thanks.
Marc Gil

Adolfo Sánchez-Barbudo Herrera escribió:
> Hi Marc,
>
> I believe that the associated JET templates must be tailored to make the
> example work in Ganymede and Galileo releases.
>
> I encourage you to send a new enhancement request
> ( https://bugs.eclipse.org/bugs/enter_bug.cgi?product=MDT& bug_severity=enhancement)
> so that it could be considered and planned by the OCL team ;)
>
> Cheers,
> Adolfo.
>
>
> Marc escribió:
>> Hi,
>>
>> I see there exists an article that explains how to insert restrictions
>> OCL in the EMF MetaModels. The article is this one:
>> http://www.eclipse.org/articles/Article-EMF-Codegen-with-OCL /
>>
>> But it works only in Eclipse Europa, tha uses a different version of
>> EMF than Eclipse Ganymede, so this article is not valid now.
>>
>> Anybody know how to insert restrictions in the MetaModel?
>>
>> I have seen a new article in the eclipse wiki
>> ( http://wiki.eclipse.org/EMF/Validation/Recipes#Recipe:_HowTo _use_the_Eclipse_Validation_Framework_with_OCL_constraints_d efined_in_a_separate_file
>> ), but it's not the same I want. This article explains how to add
>> restrictions in a separated OCL file, and references this file
>> throught an Extension in the plugin.xml
>>
>> Thanks.
>> Marc
Re: Include OCL restrictions in the EMF MetaModel [message #69594 is a reply to message #69553] Thu, 02 April 2009 18:20 Go to previous messageGo to next message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
Marc escribió:
> Hi Adolfo, I have sent the bug:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=270974
Great !!!

Just one question, why do you say that specifying the constraints in a
separated file is not what you want ?. I believe that you must obtain
the same result. Moreover, I think that writing OCL constraints should
be more pleasant for the user if he/she uses a high quality OCL Editor.
I imagine that writing those constraints as EAnnotations can't be very
user-friendly...

Cheers,
Adolfo.

> I try these templates in Eclipse Ganymede, and no code is generated in
> the model. The classes are empty.
>
> In Eclipse Europa, the templates work ok.
>
> Thanks.
> Marc Gil
>
> Adolfo Sánchez-Barbudo Herrera escribió:
>> Hi Marc,
>>
>> I believe that the associated JET templates must be tailored to make
>> the example work in Ganymede and Galileo releases.
>>
>> I encourage you to send a new enhancement request
>> ( https://bugs.eclipse.org/bugs/enter_bug.cgi?product=MDT& bug_severity=enhancement)
>> so that it could be considered and planned by the OCL team ;)
>>
>> Cheers,
>> Adolfo.
>>
>>
>> Marc escribió:
>>> Hi,
>>>
>>> I see there exists an article that explains how to insert
>>> restrictions OCL in the EMF MetaModels. The article is this one:
>>> http://www.eclipse.org/articles/Article-EMF-Codegen-with-OCL /
>>>
>>> But it works only in Eclipse Europa, tha uses a different version of
>>> EMF than Eclipse Ganymede, so this article is not valid now.
>>>
>>> Anybody know how to insert restrictions in the MetaModel?
>>>
>>> I have seen a new article in the eclipse wiki
>>> ( http://wiki.eclipse.org/EMF/Validation/Recipes#Recipe:_HowTo _use_the_Eclipse_Validation_Framework_with_OCL_constraints_d efined_in_a_separate_file
>>> ), but it's not the same I want. This article explains how to add
>>> restrictions in a separated OCL file, and references this file
>>> throught an Extension in the plugin.xml
>>>
>>> Thanks.
>>> Marc
Re: Include OCL restrictions in the EMF MetaModel [message #69694 is a reply to message #69594] Mon, 06 April 2009 13:06 Go to previous message
Marc Mising name is currently offline Marc Mising nameFriend
Messages: 193
Registered: July 2009
Location: Valencia, Spain
Senior Member
Hi Adolfo,

The main reason is for having all the constraints in only one file, the
MetaModel. With this solution, if you have only the MetaModel, you don't
know which are the constraints if you don't has this file. It's a way to
have the MetaModel and the constraints in centralized.

Marc

Adolfo Sánchez-Barbudo Herrera escribió:
> Marc escribió:
>> Hi Adolfo, I have sent the bug:
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=270974
> Great !!!
>
> Just one question, why do you say that specifying the constraints in a
> separated file is not what you want ?. I believe that you must obtain
> the same result. Moreover, I think that writing OCL constraints should
> be more pleasant for the user if he/she uses a high quality OCL Editor.
> I imagine that writing those constraints as EAnnotations can't be very
> user-friendly...
>
> Cheers,
> Adolfo.
>
>> I try these templates in Eclipse Ganymede, and no code is generated in
>> the model. The classes are empty.
>>
>> In Eclipse Europa, the templates work ok.
>>
>> Thanks.
>> Marc Gil
>>
>> Adolfo Sánchez-Barbudo Herrera escribió:
>>> Hi Marc,
>>>
>>> I believe that the associated JET templates must be tailored to make
>>> the example work in Ganymede and Galileo releases.
>>>
>>> I encourage you to send a new enhancement request
>>> ( https://bugs.eclipse.org/bugs/enter_bug.cgi?product=MDT& bug_severity=enhancement)
>>> so that it could be considered and planned by the OCL team ;)
>>>
>>> Cheers,
>>> Adolfo.
>>>
>>>
>>> Marc escribió:
>>>> Hi,
>>>>
>>>> I see there exists an article that explains how to insert
>>>> restrictions OCL in the EMF MetaModels. The article is this one:
>>>> http://www.eclipse.org/articles/Article-EMF-Codegen-with-OCL /
>>>>
>>>> But it works only in Eclipse Europa, tha uses a different version of
>>>> EMF than Eclipse Ganymede, so this article is not valid now.
>>>>
>>>> Anybody know how to insert restrictions in the MetaModel?
>>>>
>>>> I have seen a new article in the eclipse wiki
>>>> ( http://wiki.eclipse.org/EMF/Validation/Recipes#Recipe:_HowTo _use_the_Eclipse_Validation_Framework_with_OCL_constraints_d efined_in_a_separate_file
>>>> ), but it's not the same I want. This article explains how to add
>>>> restrictions in a separated OCL file, and references this file
>>>> throught an Extension in the plugin.xml
>>>>
>>>> Thanks.
>>>> Marc
Previous Topic:Problem with OCL interactive console.
Next Topic:Exception occured in OCL.dispose()
Goto Forum:
  


Current Time: Fri Apr 19 06:02:50 GMT 2024

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

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

Back to the top