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

Bug 500205

Summary: Editing in one AbstractFXEditor changes dirty state in all other AbstractFXEditors
Product: [Tools] GEF Reporter: Victor Johnsson <victor.johnsson>
Component: GEF MVCAssignee: Matthias Wienand <matthias.wienand>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: matthias.wienand, victor.johnsson
Version: unspecified   
Target Milestone: 4.1.0 (Neon.1) RC3   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
a demonstration of the bug
none
editor implementation used to generate the bug none

Description Victor Johnsson CLA 2016-08-24 09:33:28 EDT
Created attachment 263756 [details]
a demonstration of the bug

I made an editor using the GEF4 MVC Logo example by extending org.eclipse.gef.mvc.fx.ui.parts.AbstractFXEditor. If multiple AbstractFXEditor editors are open and you edit in one of the, the dirty state is changed for all the AbstractFXEditor editors as seen in the attached gif.
Comment 1 Victor Johnsson CLA 2016-08-26 03:57:12 EDT
Created attachment 263790 [details]
editor implementation used to generate the bug
Comment 2 Matthias Wienand CLA 2016-09-05 07:06:41 EDT
A check is missing to ensure that only operations within the same undo context than the domain influence the dirty state of an editor.
Comment 3 Matthias Wienand CLA 2016-09-05 08:48:14 EDT
I added the missing check so that an editor is only marked dirty if a content relevant operation is executed in its undo context. The code is published on the master branch and was backported to R4_0_maintenance. I added tests on the master branch only. Therefore, I resolve this ticket as fixed for 4.1.0 RC3 / 5.0.0 M2.