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

Bug 470612

Summary: The FXEditor does not manage its dirty state correctly.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: Matthias Wienand <matthias.wienand>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.1.0   
Target Milestone: 3.10.1 (Mars SR1) M1   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2015-06-19 11:37:39 EDT
The dirty state should be stored in an attribute and returned within #isDirty(). The editor can be considered dirty, when an operation is added to the undo-history of the editor. The editor should clear the dirty flag when saving.
Comment 1 Matthias Wienand CLA 2015-06-25 06:24:06 EDT
I added an attribute to store the editor's dirty state and enhanced the operation history listener to check for the addition of operations to the undo history in order to set the dirty flag. When the dirty flag is changed via #setDirty(boolean) a notification will be send via #firePropertyChange(PROP_DIRTY). This enables subclasses to clear the dirty flag when saving. The code is published on the master branch, therefore I resolve this ticket as fixed for 3.10.1M1.