Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » href of elements changes when saving GMF editor
href of elements changes when saving GMF editor [message #198166] Mon, 21 July 2008 18:46
chris is currently offline chrisFriend
Messages: 72
Registered: July 2009
Member
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#//Activ ityNode "/>

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#//Acti vityNode "/>

, 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."
Previous Topic:Deleting connections
Next Topic:Accessing Underlying Objects from outside the Canvas
Goto Forum:
  


Current Time: Fri Mar 29 13:33:34 GMT 2024

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

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

Back to the top