OCL constraints intended prevent node creation in an GMF generated editor only makes it invisible
Posted
by TheMorph
on Stack Overflow
See other posts from Stack Overflow
or by TheMorph
Published on 2010-05-23T15:26:57Z
Indexed on
2010/05/23
15:41 UTC
Read the original article
Hit count: 297
Hello,
I am working on editors created with GMF and struggling with OCL right now.
Is there a possibilty to prevent a node to be created if an OCL statement in the mapping evaluates to false? If tried adding an OCL statement to a node and all it does is making the node not visible in the editor, but it is created.
There is also an OCL statement in the ecore file, but this way it is only evaluated when there should be something done with the created model. I does not prevent a user to construct an invalid model but this is what I intend to prevent.
Thanks in advance,
Morph
© Stack Overflow or respective owner