Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » OCL Console in GMF
OCL Console in GMF [message #47958] Thu, 31 August 2006 15:06 Go to next message
Madanagopal is currently offline MadanagopalFriend
Messages: 39
Registered: July 2009
Member
Hallo,

I would like to test my OCL constraints written for GMF using the OCL
Interpreter Console that is provided with emf.

I tried to target this OCL Interpreter to my GMF model's target ID. but
:o . Is there any round way to achieve this in GMF. I am aware of Editor
generated with <mymodel>.genmodel. But this Interpreter console looks
promising.

Please post in your comments.

Regards,
Madanagopal.
Re: OCL Console in GMF [message #48113 is a reply to message #47958] Thu, 31 August 2006 18:00 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Madanagopal,

If you debug the OCLConsolePage.getCurrentSelection() method, what do you
see for the following:

- currently active editor
- active editor selection
- contents of the selection

If the selection's first element is either an EObject or an IAdaptable that
adapts to EObject (such as, I believe, the EditParts in a diagram editor
are), then it can be used as the OCL context element.

I suppose, though, that an EditPart will adapt to the notation view, not to
the domain element that it represents. For this, you might want to tweak
the example code to traverse the View's element reference to get the domain
element.

Note that I haven't tried any of this ...

HTH,

Christian


Madanagopal wrote:

> Hallo,
>
> I would like to test my OCL constraints written for GMF using the OCL
> Interpreter Console that is provided with emf.
>
> I tried to target this OCL Interpreter to my GMF model's target ID. but
> :o . Is there any round way to achieve this in GMF. I am aware of Editor
> generated with <mymodel>.genmodel. But this Interpreter console looks
> promising.
>
> Please post in your comments.
>
> Regards,
> Madanagopal.
Re: OCL Console in GMF [message #586979 is a reply to message #47958] Thu, 31 August 2006 18:00 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Madanagopal,

If you debug the OCLConsolePage.getCurrentSelection() method, what do you
see for the following:

- currently active editor
- active editor selection
- contents of the selection

If the selection's first element is either an EObject or an IAdaptable that
adapts to EObject (such as, I believe, the EditParts in a diagram editor
are), then it can be used as the OCL context element.

I suppose, though, that an EditPart will adapt to the notation view, not to
the domain element that it represents. For this, you might want to tweak
the example code to traverse the View's element reference to get the domain
element.

Note that I haven't tried any of this ...

HTH,

Christian


Madanagopal wrote:

> Hallo,
>
> I would like to test my OCL constraints written for GMF using the OCL
> Interpreter Console that is provided with emf.
>
> I tried to target this OCL Interpreter to my GMF model's target ID. but
> :o . Is there any round way to achieve this in GMF. I am aware of Editor
> generated with <mymodel>.genmodel. But this Interpreter console looks
> promising.
>
> Please post in your comments.
>
> Regards,
> Madanagopal.
Previous Topic:OCL Console in GMF
Next Topic:OCL and UML stereotypes
Goto Forum:
  


Current Time: Fri Apr 26 08:42:15 GMT 2024

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

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

Back to the top