Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359969

Summary: Resource file deletion on XtextSerializationException
Product: [Modeling] TMF Reporter: Daniel Trierweiler <danieltrierweiler>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 1.0.1   
Target Milestone: ---   
Hardware: All   
OS: All   
URL: http://www.eclipse.org/forums/index.php/t/244002/
Whiteboard:

Description Daniel Trierweiler CLA 2011-10-05 08:01:32 EDT
When I serialize my model and it serialization fails, it throws:

org.eclipse.xtext.parsetree.reconstr.XtextSerializationException: Serialization failed

I call it by using this code:
try {
 resource.save(Collections.EMPTY_MAP);
} catch (IOException e) {
 e.printStackTrace();
}

Sadly the results are, that my file is overwritten, which I don't want to happen. It would be nice to add a flag for example, to trigger this behaviour.

Best,
Daniel