Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Find the referent class in th ecurrent instance
Find the referent class in th ecurrent instance [message #420125] Wed, 18 June 2008 16:02 Go to next message
Yigal Spinner is currently offline Yigal SpinnerFriend
Messages: 127
Registered: July 2009
Senior Member
I'm somewhat a newbie in EMF and always trying to learn more.
Here is a question that should be simple but I can not find the answer.
In my eCore model I've class A that references class B. This is a non
containment reference.
If I have an instance of this model in memory, I want to create a
validation for class B that depends on the values in class A.
How can I find which class A instance is referencing the current
instance of class B that the validor is using?
(I tried eContaimnet, eContainer, eReference and etc and could not
figure it out)

Quick help will be appreciated.

Thanks
Yigal
Re: Find the referent class in th ecurrent instance [message #420127 is a reply to message #420125] Wed, 18 June 2008 16:21 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33216
Registered: July 2009
Senior Member
Yigal,

Comments below.

Yigal wrote:
> I'm somewhat a newbie in EMF and always trying to learn more.
> Here is a question that should be simple but I can not find the answer.
> In my eCore model I've class A that references class B. This is a non
> containment reference.
> If I have an instance of this model in memory, I want to create a
> validation for class B that depends on the values in class A.
> How can I find which class A instance is referencing the current
> instance of class B that the validor is using?
If you don't have a bidirectional references from B back to A, then it
could be referenced by many As so how would that factor in. Perhaps
this ought to be a constraint on A itself...
> (I tried eContaimnet, eContainer, eReference and etc and could not
> figure it out)
Maybe you want the reference to have an EOpposite. I.e., B would have a
reference back to A and those two references would have each other as
opposites (as in the Library's Writer/Book example).
>
> Quick help will be appreciated.
>
> Thanks
> Yigal


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:2.4RC3 Problems with import from annotated Java
Next Topic:Selective editor features in an RCP application
Goto Forum:
  


Current Time: Thu Sep 19 01:22:31 GMT 2024

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

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

Back to the top