|[Xtext 1] Could not serialize cross reference when saving programmatically created model [message #800954]
||Fri, 17 February 2012 18:42
|| Jens von Pilgrim
Registered: July 2009
to cut a long story short: when saving an Xtext/ecore based simple model
(w/o any external references) created programmatically , an exception is
Could not serialize cross reference from
root.child->element.ref to root.child->element
Note that the cross-reference is NOT an inter-resource reference. The
only problem seems to be that the reference target is serialized after
the referrer. Actually, I can serialize other models in which this is
not the case or which do not have any cross-references at all.
I have a transformation language (as an plugin) which can operate on
arbitrary EMF based models. The models are created using dynamic EMF
features. Now, I want to create a model for which an Xtext based
environment is present, let's call it myDsl model. From my
transformation language's point of view, it doesn't matter whether it is
a "pure" ecore based model or if there exists an Xtext based
parser/serializer. Anyway, it shouldn't matter, should it?
Saving the model with all myDsl components disabled is working. Of
course, in that case an XML file is created instead of a DSL-like text
file.(But all links in the XML file are correct)
The myDsl components, particularly the generated editor, are working
fine. I have implemented scoping for myDsl, and even inter-resource
cross references are working.
I'm a little puzzled, as all components work fine when running
independently. Is it possible that one Xtext based component somehow
affects another one, especially the scoping stuff?
P.S.: Still using Xtext 1.x due to project restrictions.
Powered by FUDForum
. Page generated in 0.02098 seconds