Community
Participate
Working Groups
It happened to me quite often recently in this scenario: In my self-hosting, I modified a file and broke the feature(e.g. search page). Then I had to go to orion.eclipse.org to open the broken file and make it work. After that, I kept working on the same file opened in the self-hosting. When I tried to save it, I was prompt by "out of sync" message but it is not helpful because I had to merge the changes by looking at two browser tabs separately. It would be nice if I can be notified before I start to change the file when the editor gets focus. Eclipse is doing much better in this case. When you activate a tab, at least you can decide to sync first and modify after that.
Problem could still occur if the editor that had focus already contained the file that was changed elsewhere. Can we check timestamps on save to prevent overwrite? Is there anything we could do to recover at that point? (e.g. client side diff of the contents?)
(In reply to comment #1) > Can we check timestamps on save to prevent overwrite? Is there anything we > could do to recover at that point? (e.g. client side diff of the contents?) we do check and catch the error/warn user, but if the tab has been sitting there awhile you might even forget what changed. I agree that showing diffs at that point would be helpful.
(In reply to comment #2) > (In reply to comment #1) > > > Can we check timestamps on save to prevent overwrite? Is there anything we > > could do to recover at that point? (e.g. client side diff of the contents?) > > we do check and catch the error/warn user, but if the tab has been sitting > there awhile you might even forget what changed. I agree that showing diffs > at that point would be helpful. Right, the "out of sync" message tells that we are checking the time stamps. Introducing a two-pane compare widget is worthwhile. But we then need a "comparing state" in the editor page. Opening a compare page will be hard because the current contents of the file is hard to be part of the compare URL unless we are doing local storage magic.
This is fixed in latest. There are too many commits to list here. The feature is disabled by default. It can be enabled in the "Editor Settings" page (see bug#369885 for auto-save settings as well). Current behavior: when the editor gets focus, if the contents is out of sync and the editor is not dirty, the latest content is loaded. If the editor is dirty, a confirmation dialog is shown that lets the user decide whether to reload the latest content or not. If yes, the local changes are lost. We could improve this by showing a compare editor. If the user says no, the confirmation dialog will not show anymore until the editor is saved again in another page.