|
|
|
Re: Get all object with specific value [message #727089 is a reply to message #727011] |
Tue, 20 September 2011 11:23 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Ricky,
EcoreUtil.UsageCrossReferencer can be used for something like this. Or
you can use Resource.getAllContents() to iterate over all objects in the
resource, determine which ones are instances of A, and then determine
which of those reference the particular B of interest. I'm not sure
how to turn the result into an observable list.
On 20/09/2011 3:55 AM, Ricky de Klerck wrote:
> Hi,
>
> I guess it's a simple question, but I can't find the answer...
>
> I have a Resource with objects of type A. These objects have a
> reference to object B. How can I retrieve all objects in the resource
> with a specific object B. So three objects have a reference to object
> B with id=1. I want to retrieve those three objects..
>
> It needs to be a ObservableList, so I can set it as an input of my
> tableviewer..
>
> Thanks in advance.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03317 seconds