Skip to main content



      Home
Home » Modeling » TMF (Xtext) » What is the intention of invoking serialization when calling XtextResource.save()?
icon5.gif  What is the intention of invoking serialization when calling XtextResource.save()? [message #762553] Thu, 08 December 2011 04:41 Go to next message
Eclipse UserFriend
When I rename the file test.mydsl, the serialization will be used. However, if there are some syntax errors in that file, the serialization will fail. And, the content of that file will loss. I think it is an error that the textual content of a file loss because of renaming it.

Why does not xtext keep the textual content unchanged when XtextResource.save() is called?

Can I use the parer tree serialization instead of the AST serialization?
Re: What is the intention of invoking serialization when calling XtextResource.save()? [message #762591 is a reply to message #762553] Thu, 08 December 2011 05:51 Go to previous message
Eclipse UserFriend
Hi Kevin,

the textual form is potentially out of sync with the object model. The
purpose of #save is to persist information that can be restored to an
equal instance by means of #load afterwards. It would be pointless to
persist the outdated version, wouldn't it?

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 08.12.11 10:41, schrieb Kevin Sun:
> When I rename the file test.mydsl, the serialization will be used.
> However, if there are some syntax errors in that file, the serialization
> will fail. And, the content of that file will loss. I think it is an
> error that the textual content of a file loss because of renaming it.
>
> Why does not xtext keep the textual content unchanged when
> XtextResource.save() is called?
>
> Can I use the parer tree serialization instead of the AST serialization?
Previous Topic:separate spec generation from model
Next Topic:com.google.collect missing from Require-Bundles in xtext 2.2?
Goto Forum:
  


Current Time: Tue Jul 08 13:29:00 EDT 2025

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

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

Back to the top