Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Constraint on Node Mapping does not actually restrict user from adding the item
Constraint on Node Mapping does not actually restrict user from adding the item [message #766401] Thu, 15 December 2011 18:09 Go to next message
Hoang  is currently offline Hoang Friend
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

Re: Constraint on Node Mapping does not actually restrict user from adding the item [message #767288 is a reply to message #766401] Sat, 17 December 2011 15:11 Go to previous message
Hoang  is currently offline Hoang Friend
Messages: 45
Registered: September 2011
Location: Milan
Member
Hello,

Any ideas on this issue?
Previous Topic:Audit Container does not validate
Next Topic:[GMF] Set Attributes dependant to another Attribute
Goto Forum:
  


Current Time: Thu Apr 25 12:48:50 GMT 2024

Powered by FUDForum. Page generated in 0.02898 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top