Bug 359969 - Resource file deletion on XtextSerializationException
Summary: Resource file deletion on XtextSerializationException
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL: http://www.eclipse.org/forums/index.p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-05 08:01 EDT by Daniel Trierweiler CLA
Modified: 2011-10-05 08:02 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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