Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

avoiding eclipse "changed on file system" dialog?

Tags:

eclipse

Is there a preference or tweak that will stop Eclipse from putting up a dialog "This file has been changed on the file system." when I switch to Eclipse from another editor?

Steps:

  • open eclipse project
  • edit some file and save it (page is now 'clean' but has been touched previously)
  • switch to other editor
  • edit same file
  • switch back to eclipse
  • see dialog
like image 785
larham1 Avatar asked May 02 '09 21:05

larham1


2 Answers

Maybe telling Eclipse to refresh the workspace automatically helps:

Preferences -> General -> Workspace -> Refresh automatically

like image 190
Fabian Steeg Avatar answered Nov 05 '22 03:11

Fabian Steeg


This works for me using Indigo Service Release 1, Build id: 20110916-0149, with Preferences->General->Workspace->"Refresh Using Native Hooks or Polling" and "Refresh on Access" checked.

@Piotr Dobrogost, only one of these options is needed to get rid of the dialog prompt, however it depends on what behavior you want. They do different things, but each on its own prevents the dialog. With "Refresh Using Native Hooks or Polling", the file will automatically update when the file changes without user intervention. With "Refresh on Access", the file updates only when the context changes to the editor containing the changing file. For my purposes (watching script output change), I find "Refresh Using Native Hooks or Polling" by itself the most useful.

Also, this may seem obvious, but note that this only works for files in the eclipse workspace.

like image 22
timblaktu Avatar answered Nov 05 '22 03:11

timblaktu