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

Bug 325088

Summary: DirtyStateManager confused about dirty state after undo
Product: [Modeling] TMF Reporter: E. Waldin <earl.waldin>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: unspecifiedFlags: sebastian.zarnekow: indigo+
Target Milestone: M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description E. Waldin CLA 2010-09-13 05:13:00 EDT
Build Identifier:  I20100608-0911

It appears that the dirty state manager is confused about the state of a resource when all changes are undone. The editor tab indicates that there are no changes (i.e., there is no * in the tab) and the save menu insensitive. However, an attempt to edit the resource in another editor fails with a dialog stating that the resource has been modified.

This is a problem for concurrent editing, e.g., with GMF. Fortunately, it is easy to reproduce using just Xtext.

Reproducible: Always

Steps to Reproduce:
1. open an xtext editor on some resource
2. perform any edit
3. undo edit (cntl-Z). The editor shows no changes (no * in editor tab and save insensitive).
4. invoke context menu on editor tab and select "New Editor". A new editor is opened on the resource.
5. perform an edit in the new editor. The concurrent modification dialog is presented.

Workaround: Answer "No" to the presented dialog, close the first editor and resume editing in the second editor. Although this workaround is perfectly reasonable for the above scenario, which is contrived, it is unsettling to a user working with concurrent Xtext and GMF editors.
Comment 1 E. Waldin CLA 2010-09-13 05:15:04 EDT
Oops! I forgot to mention that we are using Xtext version 1.0.1.v201008251220. Sorry.
Comment 2 Sebastian Zarnekow CLA 2010-09-24 08:14:12 EDT
Fixed on master.
Comment 3 Karsten Thoms CLA 2017-09-19 17:51:10 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 18:01:50 EDT
Closing all bugs that were set to RESOLVED before Neon.0