| Summary: | [IDE] auto reload a file changed externally | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Jing Xue <jxue01> |
| Component: | IDE | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P5 | CC: | ed.burnette, mike |
| Version: | 3.1 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Jing Xue
I assume you mean that you have the file open in an editor. I see how since you are using an editor to view a file this would be nice. But the reality is that an editors purpose is generally to edit the file. I can imagine that in the case where no changes were made inside eclipse that we could offer to remember your decision not to prompt about file changes for non-dirty editors or something. Another question is "Should there be some other view on your file such as a console or error log etc...?" Hmm I would contend that people do use editors to _view_ files. I realize from time to time one might _not_ like to automatically refresh a file changed externally, that's why I'm suggesting to make it an option (as you implied as well). I'd like to lobby for this, and not just for the IDE even though the entry is currently marked that way in the summary. These prompts are a big usability problem for an RCP app I have deployed internally now based on 3.2M4. There are two problems: 1. When you are editing a file which is deleted from disk by another process, then you try to close it, Eclipse always prompts if you want to save the file somewhere or just close. (It's worse for my app because none of my files are in a workspace so saving doesn't actually work, but that's another bug). I just want it to close it, especially if I haven't made any edits in the buffer. 2. When you are editing a file which is modified by another process. Eclipse always prompts if you want to reload the content or not (but only when you click on some other window and click back which is kind of odd). Again, even if you haven't made any edits in the buffer. My favorite plain text editor, Textpad, handles this pretty well. Under Preferences > File, it has an options group titled "When files are modified by another process:". You chose between Prompt, Auto-Reload, or Ignore. Also, you can set a couple of other toggle options. From the help file (v4.7.3): "When files are modified by another process: Prompt, Auto-Reload or Ignore. If an open file is modified by another process: Prompt will ask if it's OK to reload it; Auto-Reload will reload it automatically, unless it's been modified; Ignore will ignore the change." (I run with this set to Auto-Reload) "Ignore differences in modification times less than 2 seconds. If you get spurious notifications that a file has been modified, try changing these settings. (MS Windows caches remote files and the cached copy can get out of sync with some Netware and Unix file systems.)" (I run with this enabled) "Check for file size changes." (no help on this option but I assume it uses file size changes in addition to modification times. I run with this enabled) So, here are some ideas for options in the preferences window for all editors. An alternative is to make those two prompt dialogs "sticky" (i.e., "Remember my decision"), but you'd probably have to have a preference option for them anyway so the user could turn the prompts back on if they want. Just found this very old bug while searching bugzilla, and: Bug 248068 meanwhile fixed what's described above, I think. Bug 506960 meanwhile is a new issue for a particular corner case. I'm thus closing this one. *** This bug has been marked as a duplicate of bug 248068 *** |