Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Reference ecore model from other ecore model?
Reference ecore model from other ecore model? [message #1771369] Thu, 24 August 2017 11:55 Go to next message
Susie Agerholm is currently offline Susie AgerholmFriend
Messages: 54
Registered: April 2017
Member
I am trying to reference ecore model A from another ecore model B in order to be able to reference constructs from model B, when editing my ecore model A.

I have been following this tutorial - but it is not working.
https://stackoverflow.com/questions/9384813/can-i-reuse-ecore-models-by-importing-them-into-other-models

Reference to model B in the ecore model A file just disappears when I close the file. What am I doing wrong?
Re: Reference ecore model from other ecore model? [message #1771370 is a reply to message #1771369] Thu, 24 August 2017 11:56 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
what do you mean by "Reference to model B in the ecore model A file just disappears when I close the file. "

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Reference ecore model from other ecore model? [message #1771371 is a reply to message #1771370] Thu, 24 August 2017 11:57 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
p.s. ecore/emf question are better asked in the emf forum

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Reference ecore model from other ecore model? [message #1771379 is a reply to message #1771371] Thu, 24 August 2017 12:42 Go to previous messageGo to next message
Susie Agerholm is currently offline Susie AgerholmFriend
Messages: 54
Registered: April 2017
Member
Oh I am sorry - didn't mean to mess things up. Its just a trivial thing, I cannot find my way around the GUI.

I open the ecore file A, where I want to make the reference via the sample editor:
index.php/fa/30493/0/

I rightclick it, choose load resource and points out the file, I want to reference:
index.php/fa/30492/0/

That should be it acording to the tutorial - but does not seem to work...

  • Attachment: Udklip2.png
    (Size: 128.48KB, Downloaded 219 times)
  • Attachment: Udklip1.PNG
    (Size: 10.17KB, Downloaded 219 times)

[Updated on: Thu, 24 August 2017 13:21]

Report message to a moderator

Re: Reference ecore model from other ecore model? [message #1771380 is a reply to message #1771371] Thu, 24 August 2017 12:42 Go to previous messageGo to next message
Susie Agerholm is currently offline Susie AgerholmFriend
Messages: 54
Registered: April 2017
Member
Oh I am sorry - didn't mean to mess things up. Its just a trivial thing, I cannot find my way around the GUI.

I open the ecore file A, where I want to make the reference via the sample editor:
index.php/fa/30493/0/

I rightclick it, choose load resource and points out the file, I want to reference:
index.php/fa/30492/0/

That should be it acording to the tutorial - but does not seem to work...

[Updated on: Thu, 24 August 2017 13:22]

Report message to a moderator

Re: Reference ecore model from other ecore model? [message #1771384 is a reply to message #1771380] Thu, 24 August 2017 13:30 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
sry i have no idea

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Reference ecore model from other ecore model? [message #1771388 is a reply to message #1771384] Thu, 24 August 2017 15:00 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
What you show is just the first steup. Once you've loaded the resource, you can use the objects from either package in the other package. But if you don't add some specific reference before you close the editor, the other resource won't be loaded the next time you open the editor.

So for example, once you load the second Ecore resource, you can use one of its EPackage's EClassifiers as the type of a feature in the first resource (or use some EClass as a super type of some other EClass in the first resource). Once that relationship is established, the second resource will load as soon as the proxy is resolved.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Reference ecore model from other ecore model? [message #1771405 is a reply to message #1771384] Thu, 24 August 2017 18:10 Go to previous message
Susie Agerholm is currently offline Susie AgerholmFriend
Messages: 54
Registered: April 2017
Member
Thanks none the less - I'll try the EMF forum instead :)
Previous Topic:Blank *not* being hidden (ignored) despite rules demanding it
Next Topic:Unexpected behavior on linkage between Xtext resource and inferred JVM type
Goto Forum:
  


Current Time: Fri Mar 29 02:00:56 GMT 2024

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

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

Back to the top