Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsCompartment Nodes
https://www.eclipse.org/forums/index.php/mv/msg/805926/1416061/#msg_1416061
First post, so i'm sorry if i'm posting at the wrong section. Well, i have a NODE in GMF which has a type. The type is an ENUMERATION, with three values. I created a compartment in the GMF node, which allows me to put all the nodes that has a compartment relation with that node.
But at the current state, my main GMF node allows every node that has a composite relation to be put in, which is correct. My question is : how can use an filter (an OCL maybe ?) which would restrict me to put certain nodes inside the main node (compartment) according to the chosen type of the main node ?
To illustrate better, imagine the classical order and products examples. Imagine that the order is a node has type, which is a enumeration(fruits,electronics and books). If the order type is fruits, how to create a rule that it only allows me put products of fruit types inside it, and not electronic stuff, even if both are products. Thank you in advance for the help.