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

Bug 329100

Summary: Auto-Refresh "Stale" Files When Opening Them
Product: [Eclipse Project] Platform Reporter: Jeremy <jeremy>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, markus.kell.r, remy.suen
Version: 3.6.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Jeremy CLA 2010-10-29 16:11:00 EDT
Build Identifier: 20100917-0705

NOTE: This bug was spun off from bug #327842 (and the comments on that bug might contain relevant details).

When you change a file in the filesystem outside of Eclipse (eg. you "git stash; git stash pop"), Eclipse shows you a "Resource out of sync" page that asks you to hit F5.  This strikes me as being an unnecessary usability flaw.  If I go to open a file, I want to see that file; I shouldn't have to jump through hoops just to see it :-)

So, what I would propose is creating a brand new option (which I personally think should be on by default, but that's debatable).  If on, all this option would do is essentially "hit F5" for you, although instead of literally doing that it would probably make more sense for it to avoid showing the "Resource is out of sync" page in the first place and just take you straight to the file you were trying to open.

Just to dispel any confusion, this new option would NOT be in any way connected to the existing "General>Workspace>Refresh automatically" setting; that setting refreshes files in the background (which can be REALLY annoying) and doesn't actually help this issue if you've modified the file more recently than Eclipse has auto-refreshed.  The only connections between the proposed and existing options are:

* that existing option may have been created to solve the same problem (but as I mentioned, fell short)

* the names of both options might be similar

* it might make sense to make this new option be on whenever that existing option is on

* it might just make sense to get rid of that existing option (it seems to me that if the goal of that option is to always show you the current version of a file, this new F5 thing would accomplish it just as well ... and wouldn't slow your computer to a crawl every few minutes so that it can refresh a million files in the background)

SIDE NOTE: The lack of this option became particularly painful due to the related bug that this was spun off from (which made F5 not work); as you can probably imagine, it's annoying enough to not be able to hit F5, but when you shouldn't even have to hit F5 in the first place then it becomes REALLY annoying.  With that related bug fixed this bug has less significance, but I still think it has merit (obviously hitting F5 unnecessarily a whole bunch of times every day isn't the end of the world, but it would be nice to not have to bother with).

Reproducible: Always

Steps to Reproduce:
1. Open a file in Eclipse, then close it
2. Tweak the file in some way outside of eclipse (I believe even a simple "touch thatFile" will do the trick, but you can actually modify the file if that doesn't work)
3. Try to open the file in Eclipse
4. Fail to see the file you were trying to open, even though you just asked Eclipse to open it ;-) (you will see a "Resource Out of Sync" page instead)
Comment 1 Dani Megert CLA 2010-11-01 07:18:39 EDT
Looking back in bugzilla, there are other areas like Team commit/update, search, build etc. where users essentially like to have the file refreshed and read instead of getting the out of sync message. We should reconsider our WONTFIX on bug 14867 and add a new preference from which all tools in the Eclipse workbench can benefit. Another advantage is that the new preference will be on the same preference page ('Workspace') as the other auto-refresh preference.

*** This bug has been marked as a duplicate of bug 14867 ***