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

Bug 363273

Summary: [oclinecore] Prohibit save of erroneous ecore as ecore
Product: [Modeling] OCL Reporter: Ed Willink <ed>
Component: CoreAssignee: OCL Inbox <mdt-ocl-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 3.2.0   
Target Milestone: RC1   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Ed Willink CLA 2011-11-09 04:49:21 EST
When editing *.oclinecore, it is safe to save when there are errors since the errors are in source text.

When editing *.ecore, a save with errors stores dummy objects at the errors, which reload as no-error.

Prohibit save of errors as *.ecore when editing *.ecore. The user can always save as *.oclinecore if they want to persist work in progress.
Comment 1 Ed Willink CLA 2012-04-24 02:46:03 EDT
Same problem as answered by Ed Merks.

"You could use Resource.OPTION_SAVE_ONLY_IF_CHANGED which writes to either an in-memory or file system buffer and then compares it to the existing contents and replaces them only if they're different.  If the first part fails, it won't try the second part..."
Comment 2 Ed Willink CLA 2012-05-14 06:15:29 EDT
Pushed to master.
Comment 3 Ed Willink CLA 2013-05-20 11:37:52 EDT
CLOSED after a year in the RESOLVED state.