|
|
|
Re: Problem with Link Constraint (OCL) [message #480853 is a reply to message #480839] |
Tue, 18 August 2009 16:56 |
|
--=-oIY2sPBPWmDKHQCIzBbb
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi, Ivo,
There is a GMF enhancement request open for GMF validation to apply the
OCL option to treat EObject as the implicit root class of model classes.
This would provide access to eContainer() and the other operations that
EObject defines.
Perhaps there is something that you can override/extend in your
application to apply this option?
Cheers,
Christian
On Tue, 2009-08-18 at 12:05 -0400, Ivo Petkov wrote:
> Thanks Alex,
>
> I thought of this way, but I didn't want to make modifications to the model.
> Is this the only way?
>
> Because in my case the SubMode can be contained in two totally different containers CompositeMode and RemesDiagram - so the parent cannot be unified.
>
> Regards,
> Ivo
--=-oIY2sPBPWmDKHQCIzBbb
Content-Type: text/html; charset="utf-8"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Ivo,<BR>
<BR>
There is a GMF enhancement request open for GMF validation to apply the OCL option to treat EObject as the implicit root class of model classes. This would provide access to eContainer() and the other operations that EObject defines.<BR>
<BR>
Perhaps there is something that you can override/extend in your application to apply this option?<BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Tue, 2009-08-18 at 12:05 -0400, Ivo Petkov wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Thanks Alex,
I thought of this way, but I didn't want to make modifications to the model.
Is this the only way?
Because in my case the SubMode can be contained in two totally different containers CompositeMode and RemesDiagram - so the parent cannot be unified.
Regards,
Ivo
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>
--=-oIY2sPBPWmDKHQCIzBbb--
|
|
|
Re: Problem with Link Constraint (OCL) [message #516458 is a reply to message #480853] |
Wed, 24 February 2010 00:08 |
Jevon Messages: 164 Registered: July 2009 |
Senior Member |
|
|
For the interested, the enhancement request appears to be the following:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=256461
Strangely enough, the documentation at
http://wiki.eclipse.org/index.php/GMF_Constraints#Link_Const raints
suggests that 'eContainer' etc. are actually available, when they are
not (for nodes, at least).
In the meantime, you can set the Constraint language to "java", set
"Inject Expression Body" to true in the gmfgen [1], and use a constraint
similar to the following:
return domainElement.eContainer() != null;
Hope this helps someone :-)
Jevon
[1]: http://wiki.eclipse.org/GMF_Constraints#Java
Christian W. Damus wrote:
> Hi, Ivo,
>
> There is a GMF enhancement request open for GMF validation to apply the
> OCL option to treat EObject as the implicit root class of model
> classes. This would provide access to eContainer() and the other
> operations that EObject defines.
>
> Perhaps there is something that you can override/extend in your
> application to apply this option?
>
> Cheers,
>
> Christian
>
>
> On Tue, 2009-08-18 at 12:05 -0400, Ivo Petkov wrote:
>> Thanks Alex,
>>
>> I thought of this way, but I didn't want to make modifications to the model.
>> Is this the only way?
>>
>> Because in my case the SubMode can be contained in two totally different containers CompositeMode and RemesDiagram - so the parent cannot be unified.
>>
>> Regards,
>> Ivo
|
|
|
Powered by
FUDForum. Page generated in 0.01472 seconds