Avoiding “resource is out of sync with the filesystem”

前端 未结 10 1701
梦如初夏
梦如初夏 2020-11-29 15:22

I develop Java code with Eclipse and regularly get this message:

resource is out of sync with the filesystem.

Right-click > Refr

相关标签:
10条回答
  • 2020-11-29 16:17

    If this occurs trying to delete a folder (on *nix) and Refresh does not help, open a terminal and look for a symlink below the folder you are trying to delete and remove this manually. This solved my issues.

    0 讨论(0)
  • 2020-11-29 16:17

    When you open an Eclipse workspace from within a clearcase view and try to rename the project, you will often get the pop-up warning ... “Resource ‘project’ is out of sync with the file system”. If refreshing the project does not fix the problem, then do the following workaround: a. Open workspace WITHOUT being in a view b. Select the project in Project Explorer c. ClearCase -> Associate Project (project should now look like project [] ) d. Right click project -> Refresh (vob sub-folders should now be empty) e. Right click project -> Rename ... f. Enter New name

    Now you can close the workspace, reopen it in a view and refresh the project. You may also dissociate the project if you prefer the project not to be associated with the vob.

    0 讨论(0)
  • 2020-11-29 16:20

    For the new Indigo version, the Preferences change to "Refresh on access", and with a detail explanation : Automatically refresh external workspace changes on access via the workspace.

    As “resource is out of sync with the filesystem” this problem happens when I use external workspace, so after I select this option, problem solved.

    0 讨论(0)
  • 2020-11-29 16:21

    This happens to me all the time.

    Go to the error log, find the exception, and open a few levels until you can see something more like a root cause. Does it says "Resource is out of sync with the file system" ?

    When renaming packages, of course, Eclipse has to move files around in the file system. Apparently what happens is that it later discovers that something it thinks it needs to clean up has been renamed, can't find it, throws an exception.

    There are a couple of things you might try. First, go to Window: Preferences, Workspace, and enable "Refresh Automatically". In theory this should fix the problem, but for me, it didn't.

    Second, if you are doing a large refactoring with subpackages, do the subpackages one at a time, from the bottom up, and explicitly refresh with the file system after each subpackage is renamed.

    Third, just ignore the error: when the error dialog comes up, click Abort to preserve the partial change, instead of rolling it back. Try it again, and again, and you may find you can get through the entire operation using multiple retries.

    0 讨论(0)
提交回复
热议问题