Home » Modeling » OCL » Include OCL restrictions in the EMF MetaModel
| |
Re: Include OCL restrictions in the EMF MetaModel [message #69553 is a reply to message #69516] |
Thu, 02 April 2009 14:55 |
|
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 |
Adolfo Sanchez-Barbudo Herrera 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 |
|
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
|
|
|
Goto Forum:
Current Time: Mon Jun 03 20:54:03 GMT 2024
Powered by FUDForum. Page generated in 0.03691 seconds
|