Skip to main content



      Home
Home » Modeling » EMF » Referenced Models Navigation
Referenced Models Navigation [message #985874] Fri, 16 November 2012 09:17 Go to next message
Eclipse UserFriend
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
Re: Referenced Models Navigation [message #985879 is a reply to message #985874] Fri, 16 November 2012 09:40 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Referenced Models Navigation [message #986003 is a reply to message #985879] Sat, 17 November 2012 05:54 Go to previous messageGo to next message
Eclipse UserFriend
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.
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
Re: Referenced Models Navigation [message #986009 is a reply to message #986003] Sat, 17 November 2012 07:10 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Referenced Models Navigation [message #986301 is a reply to message #986009] Mon, 19 November 2012 14:14 Go to previous message
Eclipse UserFriend
Big thanks!

This works way better than I would have imagined.
Previous Topic:[CDO-Net4j] Measuring bandwidth of Net4j+CDO
Next Topic:CDO "Migrate EMF Genertator Model" issue or just a bad plugin dependency exception?
Goto Forum:
  


Current Time: Wed Jul 23 19:43:09 EDT 2025

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

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

Back to the top