Constraint on Node Mapping does not actually restrict user from adding the item [message #766401] |
Thu, 15 December 2011 18:09 |
Hoang Messages: 45 Registered: September 2011 Location: Milan |
Member |
|
|
Hi,
I used the following OCL constraint to restrict user to add only one Init node inside the targetBehavior:
self.targetBehavior.state -> select (s | s.oclIsTypeOf(Init)) -> size() <= 1
The fact is when user tries to add this "Init" node into the diagram, GMF protects it from drawing in the canvas, but it actually adds the Init item in the data model. The next time user opens that diagram, he is surprised because all the Init items are gone in the diagram. (But actually in the data model, they are still there)
I don't want to allow adding this Init item in the data model. Is it possible?
I hope that you understand the message. If it is not clear, please tell me.
[Updated on: Thu, 15 December 2011 18:10] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02898 seconds