Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Query2 query to find all the references of a eobject(ReferenceQuery of query2 doesnot retrieve all its references)
Query2 query to find all the references of a eobject [message #634857] Sun, 24 October 2010 17:03
manasa  is currently offline manasa Friend
Messages: 32
Registered: October 2010

The usecase i am currently working on, is to retrieve all the references of a EObject's name(belonging to a .ecore) in my workspace.

I am using ReferenceQuery of query2, which is expected to return all the references of the eobject i use as my target, as given below in the code.

EReferenceQuery<EReferenceDescriptor> refQuery;
refQuery = IndexQueryFactory.createEReferenceQuery();

IndexFactory.getInstance().executeQueryCommand(new QueryCmd<EReferenceDescriptor, EReferenceDescriptor, EReferenceQuery<EReferenceDescriptor>>(refQuery));

Here, I am setting the targetObject's name as the name, whose references are what i am trying to find.

But the result of this, is not all the references of the name, but it somehow returns back unrelated results belonging to other ecores which have absolutely no reference to the eobject i used as target.

Is this is the right option to find all the references of a particular eobject, if yes, what is it that i am missing, that its not able to retrieve all the references
or is there any other api available which can do this?

Previous Topic:Retrieving eObject From Ecore File
Next Topic:[Teneo] Correct way to extend EMFInterceptor
Goto Forum:

Current Time: Wed Aug 12 08:23:41 GMT 2020

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

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

Back to the top