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

Bug 264196

Summary: [misc] Can a Refresh button be added in the 'Resource is out of sync with the file system' editor
Product: [Eclipse Project] Platform Reporter: Raj Mandayam <ramanday>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P5 CC: contact, daniel_megert, digulla, krzysztof.daniel, mober.at+eclipse, pwebster, remy.suen, wb-rel
Version: 3.3Keywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Raj Mandayam CLA 2009-02-09 10:38:35 EST
Build ID: 3.3

Steps To Reproduce:
Can a Refresh button be added in the 'Resource is out of sync with the file system' editor

I have a java file out of sync with Eclipse, I open it I get the editor with message.

'Resource is out of sync with the file system' 
enter F5 or File>Refresh

Can the Refresh button be added to that editor. 

It would help usability.

More information:
Comment 1 Krzysztof Daniel CLA 2009-03-17 10:42:14 EDT
Actually, do we need to tell the user to refresh the resource? Can't we just trigger the refresh action in case of Out of Sync Exception?
Comment 2 Dani Megert CLA 2009-03-17 10:45:23 EDT
No. It's Eclipse policy to not do that and tell the user about this.
Comment 3 Krzysztof Daniel CLA 2009-03-23 09:44:20 EDT
Dani, could you point me to the documentation? I googled and found only this
http://wiki.eclipse.org/FAQ_When_should_I_use_refreshLocal%3F
but I'd like to learn something more.
Comment 4 Dani Megert CLA 2009-03-23 11:06:57 EDT
I can't think of any such document. This is something that just happened.
Comment 5 Krzysztof Daniel CLA 2009-03-24 04:16:57 EDT
I do not agree with the policy. 

In this particular case we know exactly which file should be refreshed and that it should be refreshed for sure, because the user wants to edit it. Performance will be not affected as we are interested in only one file.

I believe that telling the user 'File is out of sync, press F5' is not a valid workflow, it is rather picking a lock while the key is under a doormat.
Comment 6 Dani Megert CLA 2009-03-24 04:23:51 EDT
What you say is true for most actions on that resource but none of them refreshes behind the scenes. This would be a change all over the plate.

Note that users who don't like that can enable to refresh in the background (see General > Workspace preference page.

There's also a discussion that actions refresh when this preference is checked (see bug 248068).
Comment 7 Martin Oberhuber CLA 2010-02-04 23:45:45 EST
(In reply to comment #2)
> No. It's Eclipse policy to not do that and tell the user about this.

Please consider the discussion in bug 292134 as a possible way out of this.

I agree with the submitter that the "Resource is out of sync" editor is painful and bad user experience. I also agree with the general "don't refresh behind the scenes" policy, especially when autobuilders / resource deltas are involved. But in many cases, especially C/C++ development on very large projects, I believe that "Refresh on Focus" is what people want.

Regardless of that auto-refresh discussion, I also agree that a button like "Refresh now" in the out-of-sync editor would already help improve usability, since (a) the F5 key sometimes tends to use the wrong context for refreshing, and (b) some users prefer mouse/buttons over keyboard shortcuts.

Such a button shoudl be a simple thing to do, no?
Comment 8 Dani Megert CLA 2010-02-05 02:39:42 EST
>But in many cases, especially C/C++ development on very large
>projects, I believe that "Refresh on Focus" is what people want.
Sure, if for some scenarios the out of sync happens often and out refresh makes sense for them then they can decide to make an exception i.e. the C/C++ editor could do this.

>Such a button shoudl be a simple thing to do, no?
Well, it's not rocket science but it needs someone who has time to work on this and we are currently fully booked.
Comment 9 Remy Suen CLA 2010-02-22 12:09:25 EST
CC'ed parties of this bug may be interested in bug 303517.
Comment 10 Lars Vogel CLA 2019-11-14 03:18:53 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.
Comment 11 Aaron Digulla CLA 2019-11-15 05:21:23 EST
I haven't seen this since the "Refresh on access" preference option was added.

Is everyone using that? Or does someone still want a "Ask before refresh" button? Why isn't it enough to press <F5> when the error is shown?