OCL - Link Constraint [message #650225] |
Sun, 23 January 2011 12:32 |
Thorsten Koch Messages: 5 Registered: January 2011 |
Junior Member |
|
|
I want to avoid links between some classes.
In my model i defined a superclass A which contains a reference sourceConnections in order to save all the connections. This superclass is an abstract one.
I defined another three classes (B,C,D) which have all class A as a superclass.
Now I want to avoid links between C and D and B and C.
I have read the article about the link constraint ( http://wiki.eclipse.org/index.php/GMF_Constraints#Link_Const raints). But this does not really help me. I do not know how to define the constraint.
I tried:
self <> oppositeEnd and ( (self.oclIsTypeOf(C) and oppositeEnd.oclIsTypeOf(D)) or (self.oclIsTypeOf(B) and oppositeEnd.oclIsTypeOf(C)) )
But then i got the error message, that the variables C, D and B are not recognized.
This there another way to define such a constraint.
[Updated on: Sun, 23 January 2011 12:33] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04287 seconds