Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Enumerating EObject instances in a model
Enumerating EObject instances in a model [message #68107] Mon, 15 January 2007 15:26 Go to next message
Eclipse UserFriend
Originally posted by: kalin.nakov.gmail.com

Hi,

I have an EMF model loaded (in the case it's in a GMF diagram). The
metamodel consists of class MyClassA and class MyClassB which has a
reference MyClassB.myReferenceToA which points to an instance of A. I
have an EObject (instance of class MyClassA called myInstanceA). How can
I find the instance of class MyClassB in the model which has the
reference myReferenceToA which equals myInstanceA?

Thanks in advance,
Kalin
Re: Enumerating EObject instances in a model [message #68135 is a reply to message #68107] Mon, 15 January 2007 23:05 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Kalin,

This question is more appropriate for the EMF newsgroup, being a core EMF
problem.

Luckily, I can answer it! Use the getNonNavigableInverseReferences(EObject)
method of an ECrossReferenceAdapter (which you have previously attached to
your object tree, resource, or resource set.

HTH,

Christian


Kalin Nakov wrote:

> Hi,
>
> I have an EMF model loaded (in the case it's in a GMF diagram). The
> metamodel consists of class MyClassA and class MyClassB which has a
> reference MyClassB.myReferenceToA which points to an instance of A. I
> have an EObject (instance of class MyClassA called myInstanceA). How can
> I find the instance of class MyClassB in the model which has the
> reference myReferenceToA which equals myInstanceA?
>
> Thanks in advance,
> Kalin
Re: Enumerating EObject instances in a model [message #601244 is a reply to message #68107] Mon, 15 January 2007 23:05 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Kalin,

This question is more appropriate for the EMF newsgroup, being a core EMF
problem.

Luckily, I can answer it! Use the getNonNavigableInverseReferences(EObject)
method of an ECrossReferenceAdapter (which you have previously attached to
your object tree, resource, or resource set.

HTH,

Christian


Kalin Nakov wrote:

> Hi,
>
> I have an EMF model loaded (in the case it's in a GMF diagram). The
> metamodel consists of class MyClassA and class MyClassB which has a
> reference MyClassB.myReferenceToA which points to an instance of A. I
> have an EObject (instance of class MyClassA called myInstanceA). How can
> I find the instance of class MyClassB in the model which has the
> reference myReferenceToA which equals myInstanceA?
>
> Thanks in advance,
> Kalin
Previous Topic:Problem using jet.compile ANT task
Next Topic:Re: Can EMF Technology "Transaction" Execute Stand-Alone?
Goto Forum:
  


Current Time: Sat Feb 27 23:04:17 GMT 2021

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

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

Back to the top