Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » ocl constraint for allowing links only for elements in same container
ocl constraint for allowing links only for elements in same container [message #152183] Wed, 26 September 2007 05:13 Go to next message
Eclipse UserFriend
Originally posted by: michael.dev.NOSPAM.gmx.de

Hello All,

is it possible to use a ocl constraint in .gmfmap to allow connections
only for elements that share the same container and not if the elements
to be connected are in different containers? Means if element A and B
are in container C let em connect. If element A is in container C1 and B
is in C2 then do not allow a connection. Can anyone please tell me how
this constraint has to look like?

Michael
Re: ocl constraint for allowing links only for elements in same container [message #152379 is a reply to message #152183] Thu, 27 September 2007 10:21 Go to previous message
Eclipse UserFriend
Hi Michael,

I would create a "Target End Constraint" (under your Link Mapping)
in OCL like this:
self.parentContainer = oppositeEnd.parentContainer
This requires that your elements A and B have a reference to C.

Hope that helps!
Nicolai


--

I'm trying a new usenet client for Mac, Nemo OS X.
You can download it at http://www.malcom-mac.com/nemo
Previous Topic:Creation Tools for pre-defined Elements
Next Topic:Is it possible to decorate something other than a polyline cornection?
Goto Forum:
  


Current Time: Sun Jul 13 09:20:52 EDT 2025

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

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

Back to the top