Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » eopposite on a map
eopposite on a map [message #422873] Wed, 17 September 2008 19:26 Go to next message
Eclipse UserFriend
Originally posted by: luzi.anderegg.ergon.ch

Hi,

I have a map from String to Objects in my model, and this map is a
feature of class A. Is it possible to directly access class A from any
of my objects in the map (e.g. via eContainer() or something similar)?

Thanks a lot
Luzi
Re: eopposite on a map [message #422874 is a reply to message #422873] Wed, 17 September 2008 19:35 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Luzi,

The map entries themselves can use eContainer() to access the A instance.


Luzi Anderegg wrote:
> Hi,
>
> I have a map from String to Objects in my model, and this map is a
> feature of class A. Is it possible to directly access class A from any
> of my objects in the map (e.g. via eContainer() or something similar)?
>
> Thanks a lot
> Luzi


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: eopposite on a map [message #422879 is a reply to message #422874] Wed, 17 September 2008 21:03 Go to previous messageGo to next message
luciano is currently offline lucianoFriend
Messages: 16
Registered: July 2009
Junior Member
Ed,

thanks for the quick reply!
Do the objects themselves have no possibility to access the class A
(without modelling it with an extra reference)?
Re: eopposite on a map [message #422885 is a reply to message #422879] Wed, 17 September 2008 21:19 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Luciano,

Which objects? The map entry will always have a pointer. The objects
would need a bidirectional reference back to the map entry, or if it's a
containment reference, call eContainer().eContainer()...


luciano wrote:
> Ed,
>
> thanks for the quick reply!
> Do the objects themselves have no possibility to access the class A
> (without modelling it with an extra reference)?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Problem resolving EAnnotation references
Next Topic:[Teneo] Implementation classes only
Goto Forum:
  


Current Time: Sat Apr 20 04:08:13 GMT 2024

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

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

Back to the top