Enumerating EObject instances in a model [message #68107] |
Mon, 15 January 2007 15:26 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.01442 seconds