3

Here is my problem>

We currently have several Ecore models for our applications. One of the Ecore models (mainModel.ecore) has stuff that is common in all the rest of the models. So, what i want to do is have all the other models reference the contents of that one model so we do not have to constantly copy the contents of that one model into all the models every time there is a change.

Is this possible and how can I do this?

(I am very new to Ecore and still do not understand a lot of the terminology.)


EDIT:

How do i get the EcoreUtil.getRootContainer to return the the container of the loaded resource? I need to have that location so that i can resolve certain paths from that root. This may resolve my issue.


Here is what i attempted so far:

I tried "load resource..." by loading the mainModel.ecore into all the other models and deleting the local references. There were a lot of places that i had to fix after doing this and i did. After re-generating the source and trying to compile there are places where it tried accessing the "dotpath" that was local to the original file and i do not know how to change that "dotpath" to reference the "loaded resource". So it is not able to resolve those paths.

Thanks!

Lii
  • 11,553
  • 8
  • 64
  • 88
prolink007
  • 33,872
  • 24
  • 117
  • 185

1 Answers1

2

You'll generally get answers about EMF more readily by using the EMF newsgroup (eclipse.tools.emf) which is web accessible via

http://www.eclipse.org/forums/index.php/f/108/

Your problem isn't so clear. I don't understand how the compiled code accesses anything via a "dot path". I know if you load a resource and refer to it's contents you'll generally end up with relative paths, but those are normally resolved during loading to an absolute URI. Of course the referencing resource itself needs to be loaded with an absolute URI, but the generator does that properly...

Ed Merks
  • 21
  • 1
  • My question is actually already there. I was hoping that either SO or the EMF forums could answer my question. I will try to clear my question up a little and let you know when it is done. – prolink007 Dec 30 '11 at 13:59
  • How do i get the `EcoreUtil.getRootContainer` to return the the container of the loaded resource? I need to have that location so that i can resolve certain paths from that root. This may resolve my issue. – prolink007 Dec 30 '11 at 16:01