Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363273 - [oclinecore] Prohibit save of erroneous ecore as ecore
Summary: [oclinecore] Prohibit save of erroneous ecore as ecore
Status: CLOSED FIXED
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: 3.2.0   Edit
Hardware: PC Windows Vista
: P3 major (vote)
Target Milestone: RC1   Edit
Assignee: OCL Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-09 04:49 EST by Ed Willink CLA
Modified: 2013-05-20 11:37 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 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.