Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » How to implement rules to a connector
How to implement rules to a connector [message #1751619] Wed, 11 January 2017 22:56 Go to next message
Lainis 20 is currently offline Lainis 20Friend
Messages: 26
Registered: November 2016
Junior Member
Hi,

I have a case in which a connector can be used for any of my metamodel elements, but once it's used by an element only can be connected to the same element.

Can anyone help me to implement that rule on my project?

Thanks
Re: How to implement rules to a connector [message #1751661 is a reply to message #1751619] Thu, 12 January 2017 10:47 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

This sounds like a case for GMF live constraints, as you want to disallow the change based on some custom logic - that's one thing that EVL cannot do as far as I know.

It would be a good idea to first try tweaking your .gmfmap, and then automating the changes using a Eugenia polishing transformation:

https://wiki.eclipse.org/Graphical_Modeling_Framework/Concepts/Constraints
https://wiki.eclipse.org/Graphical_Modeling_Framework/Tutorial/Part_2#Link_Constraints

Do you mean that once the connector is linked to an element of type T, it can only be connected to another element of the same type T? In that case, the constraint would be something like "self.oclIsTypeOf(oppositeEnd.eClass)" or something similar, I would guess.

Previous Topic:Problems loading XSD in standalone transformation
Next Topic:higher-order transformation
Goto Forum:
  


Current Time: Fri Apr 26 00:39:39 GMT 2024

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

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

Back to the top