Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » integration the OCL validation in EMF generated editor
integration the OCL validation in EMF generated editor [message #531354] Tue, 04 May 2010 15:02 Go to next message
Eclipse UserFriend
Originally posted by: maximpb.gmx.net

Hello,

i am currently doing a research project at RWTH Aachen university
concerning configuration editors.
I use the eclipse model framework to generate a functional network editor
from the ecore metamodel. Then i extend my metamodel with the same data
structures as the audit container, audit rules and constraints from gmfmap
for variating functionality (i.e. if the function variant A is selected,
the function variant B must me selected as well).

Now i want to generate a new layer (configuration view) from my previously
generated editor, which validates against the constraints and calculates
valid configurations. My idea of solution is to use the same generator
templates as GMF does, but i can not find any helpful sources or papers
concerning this process.

Am i on the right track? Does somebody know if there are similar projects
using this approach or can somebody give me a hint on how to integrate the
OCL validation in my functional network editor?

Thanks in advance for any help or suggestions,
Maxim
Re: integration the OCL validation in EMF generated editor [message #531407 is a reply to message #531354] Tue, 04 May 2010 18:35 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Maxim

I'm not sure where GMF templates come in.

Using EMF 2.6.0 >= M4 and MDT/OCL 3.0.0 >= M6 you can follow
http://wiki.eclipse.org/MDT/OCLinEcore to add OCL to your Ecore models
using the Sample Ecore Editor Properties View.

Using the MDT/OCL 3.0.0 Examples >= M7 you can Open With->OCLinEcore
editor and get a textual view of the Ecore to which you can add OCL.
This will save back as a *.ecore as if you had used the Sampl Ecore
Editor, unless you use Save As OCLinEcore from the Outline context menu
to persist the text (and comments) instead.

See the above wiki for an update imminently.

With OCL in your Ecore models, validation should automatically use it.

Regards

Ed Willink


On 04/05/2010 16:02, Maxim Pogrebinski wrote:
> Hello,
>
> i am currently doing a research project at RWTH Aachen university
> concerning configuration editors.
> I use the eclipse model framework to generate a functional network editor
> from the ecore metamodel. Then i extend my metamodel with the same data
> structures as the audit container, audit rules and constraints from gmfmap
> for variating functionality (i.e. if the function variant A is selected,
> the function variant B must me selected as well).
>
> Now i want to generate a new layer (configuration view) from my previously
> generated editor, which validates against the constraints and calculates
> valid configurations. My idea of solution is to use the same generator
> templates as GMF does, but i can not find any helpful sources or papers
> concerning this process.
>
> Am i on the right track? Does somebody know if there are similar projects
> using this approach or can somebody give me a hint on how to integrate the
> OCL validation in my functional network editor?
>
> Thanks in advance for any help or suggestions,
> Maxim
Re: integration the OCL validation in EMF generated editor [message #531837 is a reply to message #531407] Thu, 06 May 2010 10:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: maximpb.gmx.net

Am Tue, 04 May 2010 19:35:42 +0100 schrieb Ed Willink:

> Hi Maxim
>
> I'm not sure where GMF templates come in.
>
> Using EMF 2.6.0 >= M4 and MDT/OCL 3.0.0 >= M6 you can follow
> http://wiki.eclipse.org/MDT/OCLinEcore to add OCL to your Ecore models
> using the Sample Ecore Editor Properties View.
>
> Using the MDT/OCL 3.0.0 Examples >= M7 you can Open With->OCLinEcore
> editor and get a textual view of the Ecore to which you can add OCL.
> This will save back as a *.ecore as if you had used the Sampl Ecore
> Editor, unless you use Save As OCLinEcore from the Outline context menu
> to persist the text (and comments) instead.
>
> See the above wiki for an update imminently.
>
> With OCL in your Ecore models, validation should automatically use it.
>
> Regards
>
> Ed Willink
>
>
> On 04/05/2010 16:02, Maxim Pogrebinski wrote:
>> Hello,
>>
>> i am currently doing a research project at RWTH Aachen university
>> concerning configuration editors.
>> I use the eclipse model framework to generate a functional network editor
>> from the ecore metamodel. Then i extend my metamodel with the same data
>> structures as the audit container, audit rules and constraints from gmfmap
>> for variating functionality (i.e. if the function variant A is selected,
>> the function variant B must me selected as well).
>>
>> Now i want to generate a new layer (configuration view) from my previously
>> generated editor, which validates against the constraints and calculates
>> valid configurations. My idea of solution is to use the same generator
>> templates as GMF does, but i can not find any helpful sources or papers
>> concerning this process.
>>
>> Am i on the right track? Does somebody know if there are similar projects
>> using this approach or can somebody give me a hint on how to integrate the
>> OCL validation in my functional network editor?
>>
>> Thanks in advance for any help or suggestions,
>> Maxim

My Problem is, that the constraints are unknown at ecore time. They should
be created at the runtime of functionalnetwork editor (generated from ecore
metamodel)
thx
Re: integration the OCL validation in EMF generated editor [message #532010 is a reply to message #531837] Thu, 06 May 2010 18:17 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Maxim

Ok, it seems we were getting in an M-level confusion.

CompleteOCL (Section 12 of the OCL specification) is an OCL document
syntax that complements an associated (meta-)model.

You could arrange to generate OCL text, or you could generate the OCL
AST and use the QVTd unparser to convert it to text, or you could
generate the OCL Examples Xtext CST and serialize that. Of these
direct generation of CompleteOCL is probably the most reliable, since
the OCL specification does not adequately specify its AST, and so is
liable to change once URIs for references are defined.

MDT/OCL supports loading a document.

Regards

Ed Willink

On 06/05/2010 11:39, Maxim Pogrebinski wrote:
> Am Tue, 04 May 2010 19:35:42 +0100 schrieb Ed Willink:
>
>> Hi Maxim
>>
>> I'm not sure where GMF templates come in.
>>
>> Using EMF 2.6.0>= M4 and MDT/OCL 3.0.0>= M6 you can follow
>> http://wiki.eclipse.org/MDT/OCLinEcore to add OCL to your Ecore models
>> using the Sample Ecore Editor Properties View.
>>
>> Using the MDT/OCL 3.0.0 Examples>= M7 you can Open With->OCLinEcore
>> editor and get a textual view of the Ecore to which you can add OCL.
>> This will save back as a *.ecore as if you had used the Sampl Ecore
>> Editor, unless you use Save As OCLinEcore from the Outline context menu
>> to persist the text (and comments) instead.
>>
>> See the above wiki for an update imminently.
>>
>> With OCL in your Ecore models, validation should automatically use it.
>>
>> Regards
>>
>> Ed Willink
>>
>>
>> On 04/05/2010 16:02, Maxim Pogrebinski wrote:
>>> Hello,
>>>
>>> i am currently doing a research project at RWTH Aachen university
>>> concerning configuration editors.
>>> I use the eclipse model framework to generate a functional network editor
>>> from the ecore metamodel. Then i extend my metamodel with the same data
>>> structures as the audit container, audit rules and constraints from gmfmap
>>> for variating functionality (i.e. if the function variant A is selected,
>>> the function variant B must me selected as well).
>>>
>>> Now i want to generate a new layer (configuration view) from my previously
>>> generated editor, which validates against the constraints and calculates
>>> valid configurations. My idea of solution is to use the same generator
>>> templates as GMF does, but i can not find any helpful sources or papers
>>> concerning this process.
>>>
>>> Am i on the right track? Does somebody know if there are similar projects
>>> using this approach or can somebody give me a hint on how to integrate the
>>> OCL validation in my functional network editor?
>>>
>>> Thanks in advance for any help or suggestions,
>>> Maxim
>
> My Problem is, that the constraints are unknown at ecore time. They should
> be created at the runtime of functionalnetwork editor (generated from ecore
> metamodel)
> thx
>
>
Previous Topic:OMG's OCL specification
Next Topic:EMF Plugin
Goto Forum:
  


Current Time: Thu Apr 25 05:59:36 GMT 2024

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

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

Back to the top