[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] href of elements changes when saving GMF editor

Hi,

I have a metamodel A which refers to another metamodel B (here: UML.ecore; one of the classes of A has an EReference of type UML.ecore#Activity).

In addition, I have a metamodel C which contains a reference of type EPackage, which shall hold references to other metamodels (here: A and B). In addition, classes of C have a reference of type EClass which shall hold classes contained in the mentioned packages.

Finally, I have a GMF editor for C. When creating a diagram, I choose "Load resource" and load A. This then allows me to add A and B to the packages reference of c. I can then type my elements accordingly.

Now the problem is that GMF saves the instance of C such like this:

<type href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//ActivityNode"/>

Unfortunately, I run into problems with other code also working on models of type C. If I replace all occurences of the href attribute with

<type href="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//ActivityNode"/>

, my other code works fine. But working again on such a model with my GMF editor (and finally saving) changes everything back to the above.

I guess that my other code does not find the UML.ecore metamodel since it is linked in a relative way. Any way around this?

And since I'm not very comfortable with the whole resource stuff: Does anybody know a good link or two with information about that?

Thanks in advance,
Christian


--
John Lennon: "Life is what happens to you while you're busy making other plans."