Community
Participate
Working Groups
Created attachment 189179 [details] patch 1 In bug 303517 we core.resources sync state in a timely manner when resources are discovered out-of-sync. The TextEditor should prompt the user in this case. Backtrace looks something like: File(Resource).isSynchronized(int) line: 1505 ResourceTextFileBuffer(ResourceFileBuffer).isSynchronized() line: 488 TextFileDocumentProvider.isSynchronized(Object) line: 1199 TextEditor(AbstractTextEditor).sanityCheckState(IEditorInput) line: 4889 TextEditor(StatusTextEditor).sanityCheckState(IEditorInput) line: 257 TextEditor(AbstractTextEditor).safelySanityCheckState(IEditorInput) line: 4868 AbstractTextEditor$ActivationListener.handleActivation() line: 983 followed by: TextEditor(AbstractTextEditor).handleEditorInputChanged() line: 4707 TextEditor(StatusTextEditor).handleEditorInputChanged() line: 267 TextEditor(AbstractTextEditor).sanityCheckState(IEditorInput) line: 4890 TextEditor(StatusTextEditor).sanityCheckState(IEditorInput) line: 257 TextEditor(AbstractTextEditor).safelySanityCheckState(IEditorInput) line: 4868 AbstractTextEditor$ActivationListener.handleActivation() line: 983 In the first backtrace, it's true that the file is out-of-sync, in the second the dialog is brought up. The editor should not show the File Changed dialog if not dirty.
I'm confused now: the summary say: Don't prompt user when clean editor is about to be brought back into sync comment 0 says: The TextEditor should prompt the user in this case. Can you provide some simple steps?
(In reply to comment #1) > I'm confused now: the summary say: > Don't prompt user when clean editor is about to be brought back into sync > comment 0 says: > The TextEditor should prompt the user in this case. Sorry, comment 0 wrong. Steps: 1 Create text file 2 Open in editor (clean) 3 Modify the file outside of eclipse 4 Change back to editor. At step 4, if the resource is discovered out-of-sync a "File changed" dialog is displayed. Irrespective of the dialog, if a resource change event fires, the editor is brought into sync anyway. With bug 303517 the editor will be brought into sync soon after discovered out-of-sync. The result is that dialog has no effect.
*** This bug has been marked as a duplicate of bug 97510 ***
Comment on attachment 189179 [details] patch 1 The patch is not good as textual editors can work on other models than just core.resources (e.g. EFS). The fix needs to deal with that.