Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Referenced Models Navigation
Referenced Models Navigation [message #985874] Fri, 16 November 2012 14:17 Go to next message
Markus Riedl is currently offline Markus RiedlFriend
Messages: 20
Registered: November 2012
Junior Member
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 14:40 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Referenced Models Navigation [message #986003 is a reply to message #985879] Sat, 17 November 2012 10:54 Go to previous messageGo to next message
Markus Riedl is currently offline Markus RiedlFriend
Messages: 20
Registered: November 2012
Junior Member
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 12:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Referenced Models Navigation [message #986301 is a reply to message #986009] Mon, 19 November 2012 19:14 Go to previous message
Markus Riedl is currently offline Markus RiedlFriend
Messages: 20
Registered: November 2012
Junior Member
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: Thu Apr 25 05:46:03 GMT 2024

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

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

Back to the top