|
Re: OCL Console in GMF [message #48113 is a reply to message #47958] |
Thu, 31 August 2006 18:00 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.02960 seconds