Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to constrain a reference to be from a particular set ?
How to constrain a reference to be from a particular set ? [message #534768] Thu, 20 May 2010 09:42
Julien Richard-Foy is currently offline Julien Richard-FoyFriend
Messages: 3
Registered: May 2010
Junior Member
One of the properties of my Transition entity is a reference to an Event entity. In the diagram editor generated by GMF I am allowed to set this event property to any of the Event entities of the diagram. But I would like to constrain the possible values for this property to a subset of these entities: those which are already included in a events set defined in an Interaction entity.

I tried to define an OCL constraint on the Transition Mapping :

Interaction.allInstances()->forAll(interaction|interaction.events- >includes(self.event))

But it doesn't work: I can create Transitions in the diagram editor, but they're not drawed and I can't therefore try to set their event property (transitions are registered in the core file though not visible in the diagram).
Previous Topic:pass a parameter in object contribution
Next Topic:Which method is called when a tool in the palette becomes active?
Goto Forum:
  


Current Time: Sat Nov 09 03:05:30 GMT 2024

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

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

Back to the top