|
|
|
Re: Serialization format [message #775567 is a reply to message #775560] |
Fri, 06 January 2012 09:30 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Jeff,
That sounds trickier. You want to display the source DSL syntax to the
user, but whenever you save or load, you want the actual serialized
representation to be XML? I imagine that's possible, but you'd
definitely need to fuss with there being two resources implementations
and copying the contained instances between those resources. I.e., for
loading, you'd need to load with the XML resource impl and then
copy/move the contents to an Xtext-based resource implementation;I'm not
sure the serializer is invoked automatically to produce the node model
Xtext needs, but that's certainly supported and feasible. Then when you
save, you'd need to copy the contents back to the XML resource impl and
save that instead. With some effort, I sure that would all be
possible. But the devil is in the details. I wonder if anyone else has
tried this. (It would be interesting to support this possibility for
Xcore.)
On 06/01/2012 10:21 AM, Jeff MAURY wrote:
> Thanks for your reply. My question was much related to the Xtext
> editor. Is it possible that the loading and writing of the resource
> can be hooked so that the conversion from/to XML is done as you said,
> so that the resource is always XML ?
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02976 seconds