Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Building a Bidirectional Containment Map(I need help figuring out the last part of my tutorial)
Building a Bidirectional Containment Map [message #1144167] Fri, 18 October 2013 17:55 Go to next message
Ken Keefe is currently offline Ken KeefeFriend
Messages: 41
Registered: April 2012
Member
I'm trying to create a map that contains the values and also provides a bidirectional reference for the values back to the object that contains the map. Hopefully, EMF can take care of managing the bidirectional references for me. I've done a lot of googling and have had no luck. I started writing a tutorial in order to work through the problem. Please take a look at the tutorial, which is short, and comment if you know how to solve the last part.

You can download the example project from the tutorial page.

https://www.perform.csl.illinois.edu/~kjkeefe/?p=135
Re: Building a Bidirectional Containment Map [message #1145064 is a reply to message #1144167] Sat, 19 October 2013 08:18 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Ken,

Given a Person p, p.eContainer() is map entry and
p.eContainer().eContainer() is the container of that map entry, in your
case, it will be a Bus. It seems to me though that likely you should
just have Bus contain Person and you just want so convenient looked
operation to find a Person by name, and perhaps it's important that it
be really fast, so perhaps you want to build a map/cache, but building a
cache introduces the problem of how to manage its consistency with
respect to the Persons of the Bus and with respect to the name of each
Person, both of which can change...


On 18/10/2013 7:55 PM, Ken Keefe wrote:
> I'm trying to create a map that contains the values and also provides
> a bidirectional reference for the values back to the object that
> contains the map. Hopefully, EMF can take care of managing the
> bidirectional references for me. I've done a lot of googling and have
> had no luck. I started writing a tutorial in order to work through the
> problem. Please take a look at the tutorial, which is short, and
> comment if you know how to solve the last part.
> You can download the example project from the tutorial page.
>
> https://www.perform.csl.illinois.edu/~kjkeefe/?p=135


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Need simple example bind EMF-Model value to simple swt widget
Next Topic:ReplaceCommand for root objects
Goto Forum:
  


Current Time: Sat Apr 20 06:11:40 GMT 2024

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

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

Back to the top