Skip to main content



      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 07:55 Go to next message
Eclipse UserFriend
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 07:56 Go to previous messageGo to next message
Eclipse UserFriend
what do you mean by "Reference to model B in the ecore model A file just disappears when I close the file. "
Re: Reference ecore model from other ecore model? [message #1771371 is a reply to message #1771370] Thu, 24 August 2017 07:57 Go to previous messageGo to next message
Eclipse UserFriend
p.s. ecore/emf question are better asked in the emf forum
Re: Reference ecore model from other ecore model? [message #1771379 is a reply to message #1771371] Thu, 24 August 2017 08:42 Go to previous messageGo to next message
Eclipse UserFriend
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 257 times)
  • Attachment: Udklip1.PNG
    (Size: 10.17KB, Downloaded 257 times)

[Updated on: Thu, 24 August 2017 09:21] by Moderator

Re: Reference ecore model from other ecore model? [message #1771380 is a reply to message #1771371] Thu, 24 August 2017 08:42 Go to previous messageGo to next message
Eclipse UserFriend
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 09:22] by Moderator

Re: Reference ecore model from other ecore model? [message #1771384 is a reply to message #1771380] Thu, 24 August 2017 09:30 Go to previous messageGo to next message
Eclipse UserFriend
sry i have no idea
Re: Reference ecore model from other ecore model? [message #1771388 is a reply to message #1771384] Thu, 24 August 2017 11:00 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: Reference ecore model from other ecore model? [message #1771405 is a reply to message #1771384] Thu, 24 August 2017 14:10 Go to previous message
Eclipse UserFriend
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: Sat Jul 12 17:51:28 EDT 2025

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

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

Back to the top