Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Single connection between two nodes
Single connection between two nodes [message #205534] Mon, 15 September 2008 20:09 Go to next message
Eclipse UserFriend
Originally posted by: zor0901.yahoo.com

Hi all,

does anyone know which OCL constrain I should use, if I want to have only
a single/unique connection between two nodes (e.g. I have a connection
between nodes N1 and N2, and I want it to be unique- the user should not
be able to create connection neither from N1 to N2, not from N2 to N1)

Thanks for your help,
Zori
Re: Single connection between two nodes -- OCL [message #206161 is a reply to message #205534] Sun, 21 September 2008 13:23 Go to previous message
Eclipse UserFriend
Originally posted by: xxx.xxxxxxxx.xxx

Hallo Zori,

depending on your domain model, the OCL expression for the Link Mapping
could look like this:

self.sourceConnections->forAll(conn|conn.target<>oppositeEnd) and
self.targetConnections->forAll(conn|conn.source<>oppositeEnd)

You could define it as a Link Constraint for your Link Mapping (either a
Source End Constraint of Target End Constraint- both will do the same job,
having this expression).

Best wishes,
Iliyana




Zori wrote:

> Hi all,

> does anyone know which OCL constrain I should use, if I want to have only
> a single/unique connection between two nodes (e.g. I have a connection
> between nodes N1 and N2, and I want it to be unique- the user should not
> be able to create connection neither from N1 to N2, not from N2 to N1)

> Thanks for your help,
> Zori
Previous Topic:Figure Resize only bigger
Next Topic:GMF editor context menu
Goto Forum:
  


Current Time: Tue Jan 19 19:22:02 GMT 2021

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

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

Back to the top