Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Find all references in ecore model
Find all references in ecore model [message #1731121] Tue, 03 May 2016 01:05 Go to next message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 210
Registered: February 2014
Senior Member
Hi All,

I'm struggling with finding all references/uses of an object in the model. I have tried "eobject.CrossRefrences()" , didn't work.

Acceleo has an eInverse() method which provides all the references/uses to the eobject. Is there any equivalent method that could do the same as eInverse() ?

Thanks,
Bests,
Parsa
Re: Find all references in ecore model [message #1731141 is a reply to message #1731121] Tue, 03 May 2016 07:26 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
On 03-May-16 03:05, Parsa Pourali wrote:
> Hi All,
>
> I'm struggling with finding all references/uses of an object in the
> model.

Look at the various subclasses and helpers in EcoreUtil.CrossReferencer,
for example to find where an object is being used, you have
http://download.eclipse.org/modeling/emf/emf/javadoc/2.4.3/org/eclipse/emf/ecore/util/EcoreUtil.UsageCrossReferencer.html



And if you have to be fast, you can use an adapter that maintains the
information dynamically:
http://download.eclipse.org/modeling/emf/emf/javadoc/2.7.0/org/eclipse/emf/ecore/util/ECrossReferenceAdapter.html

Sorry for the different versions in these links, I just googled the
classes and these popped up.

Felix
Re: Find all references in ecore model [message #1731254 is a reply to message #1731141] Tue, 03 May 2016 20:12 Go to previous message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 210
Registered: February 2014
Senior Member
Thanks a lot Felix !

Regards,
Parsa
Previous Topic:Ecore meta-model formal documentation?
Next Topic:[Xcore] *.xmi or *.ecore as an output
Goto Forum:
  


Current Time: Wed Apr 24 21:27:01 GMT 2024

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

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

Back to the top