|
|
Re: QVTo transformation with Xtext target models [message #1857012 is a reply to message #1857005] |
Thu, 12 January 2023 20:15 |
Ed Willink Messages: 7669 Registered: July 2009 |
Senior Member |
|
|
Hi
The Xtext serializer should work automatically when you use the appropriate extension; as you have found.
But the serializer can fail with a fairly verbose and fairly informative exception when the auto-generated model does not comply with a regular generation.
I spent many 'pleasant' hours debugging for OCL and QVTd serialization. I think I eventually agreed that the serializer was correct each time. Debugging can be assisted by saving first to a *.xmi file before the *.xtext. This gives you an XMI file to study wrt the exception.
While you are getting your 'eye in' on the exception message, you may find it helpful to do a side-by-side comparison of the XMI for small examples; forward-Xext versus your programatic-generation. This will enable you to understand the multiplicities in the diagnostics; it is nearly always a multiplicity bug, but sometimes it's ancestry.
Regards
Ed Willink
[Updated on: Thu, 12 January 2023 20:27] Report message to a moderator
|
|
|
Re: QVTo transformation with Xtext target models [message #1857038 is a reply to message #1857012] |
Fri, 13 January 2023 19:40 |
John Henbergs Messages: 239 Registered: October 2020 |
Senior Member |
|
|
Hi,
Attached to this reply I am sending a repro, with a very simple example where starting from a UML Model which only has a package, by writing QVTo transformations I am trying to convert it to a .myDsl file conforming to an Xtext grammar, in which I have defined Package as a concept.
My work is much bigger, but this happens even with this simple example. In the repro you can find the Xtext files, and a folder named "TestTransformations" which should be imported in the runtime instance. My.uml is the source model and TestTransformation.xmi and TestTransformation.myDsl are the target models that are an output of running the QVTo transformation. I have also included the launch configuration file.
Thanks for any help!
[Updated on: Fri, 13 January 2023 19:47] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04019 seconds