I hope this isn't posted somewhere else but the search I did resulted in nothing.

My situation is the following:

I have three models A, B and AB, A and B are selfcontained models.

Then model AB references Model A and B and introduces links between A and B.

So in model AB I have an EClass with two EReferences one to model A and one to model B.

Ok, now it is easy to navigate from the the center (the link) to the two parts of either model A or model B.

What I want to know is, is there a possibilty to navigate from the element from model A to model B, without searching the whole known links and changing model A or B?

Or are there best practices for doing so?

Regards,

Markus]]>

Things like an ECrossReferenceAdapter or ECoreUtil.CrossReference help,

but they essentially must navigate all the links to find the

non-navigable inverses.

On 16/11/2012 3:23 PM, Markus Riedl wrote:

> Hi,

>

> I hope this isn't posted somewhere else but the search I did resulted

> in nothing.

>

> My situation is the following:

> I have three models A, B and AB, A and B are selfcontained models.

>

> Then model AB references Model A and B and introduces links between A

> and B.

>

> So in model AB I have an EClass with two EReferences one to model A

> and one to model B.

>

> Ok, now it is easy to navigate from the the center (the link) to the

> two parts of either model A or model B.

>

> What I want to know is, is there a possibilty to navigate from the

> element from model A to model B, without searching the whole known

> links and changing model A or B?

>

> Or are there best practices for doing so?

>

> Regards,

> Markus]]>

That seems to be it that I'm looking for: But it seems that for this solution

every Resource has to "live" in the same ResourceSet.

Where now I come to a point to which I cannot completely wrap my head around.

I always have the point of view that somehow a ResourceSet corresponds to Model where only

Resources of those models should "live".

Is this a to narrow view? What would be the best practice for my case? That they should live in

a single ResourceSet?

Best regards,

Markus]]>

Comments below.

On 17/11/2012 11:54 AM, Markus Riedl wrote:

> Thank you (especially considering how fast you where, wow!).

>

> That seems to be it that I'm looking for: But it seems that for this

> solution every Resource has to "live" in the same ResourceSet.

Yes, these solutions only work by looking at all the resources in the

resource set.

> Where now I come to a point to which I cannot completely wrap my head

> around. I always have the point of view that somehow a ResourceSet

> corresponds to Model where only Resources of those models should "live".

> Is this a to narrow view?

Xtext uses a resource set to work with (and index) all the model

resources being built in the whole workspace

> What would be the best practice for my case? That they should live in

> a single ResourceSet?

I don't know enough about your application or why you need these

inverses. If your mapping model refers to the resources that are being

mapped, they'll all live in the same resource set unless you take steps

to do that some other way.

>

> Best regards,

> Markus]]>

This works way better than I would have imagined.]]>