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

Bug 262178

Summary: "out of sync with file system" error cannot be cleared by refresh or restart
Product: [Technology] DLTK Reporter: Tom Boutell <tom>
Component: CommonAssignee: dltk.common-inbox <dltk.common-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: bokowski, gadi, knob, mjs, remy.suen, spektom
Version: 1.0   
Target Milestone: 1.0RC1   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
patch none

Description Tom Boutell CLA 2009-01-23 09:56:28 EST
I am using Eclipse Platform version 3.4.1 with PDT core version 2.0.0.v20081229-1135.

At some point I edited a project PHP file in an external editor, vim. That editor is no longer running (the machine has been rebooted, there is no PHP .swp file, etc).

When I open Eclipse I receive this message regarding the PHP file:

"resource is out of sync with the file system"

I followed the recommendation to press F5, and to select refresh from the file menu. Both actions have no effect, the message stays.

I also restarted Eclipse with no effect.

Unfortunately, at this point Eclipse is unusable for me.

This has recently been reported by another user on the dev-eclipse list rather than as a bug report:

http://dev.eclipse.org/mhonarc/lists/pdt-dev/msg00770.html

That user appears not to have found any resolution either.
Comment 1 Remy Suen CLA 2009-01-23 11:23:28 EST
Did you try refreshing its parent folder? Did you try closing and reopening the project? Where is this resource physically located? Did you try deleting the project (without deleting its contents) and then recreating the project?
Comment 2 Eric Moffatt CLA 2009-01-28 14:03:31 EST
If I cause this to happen by editing a .java file in Notepad I can see the 'out of synch' pseudo-editor but in my case hitting F5 or directly executing Refresh fixes the issue and the editor shows the new version of the file.

Could you try this out with non-PHP files and let me know if you see similar issues?
Comment 3 Boris Bokowski CLA 2009-02-03 16:31:45 EST
Moving to PDT.
Comment 4 Michael Stillwell CLA 2009-03-15 16:06:38 EDT
Does it help to close the file and reopen it?  This helps with PHP files for me.  Files of other types (e.g. JavaScript) do reload correctly if refreshed.
Comment 5 Michael Spector CLA 2009-04-10 13:36:34 EDT
Re-freshing & re-opening the file fixes this problem.
Comment 6 Michael Stillwell CLA 2009-04-13 16:13:41 EDT
(In reply to comment #5)
> Re-freshing & re-opening the file fixes this problem.

The message does not say that re-opening the file is necessary.  (Nor should it be.)
Comment 7 Gadi Goldbarg CLA 2009-06-17 08:26:46 EDT
Refresh does not work still (File->Refresh or F5).
Yet close/open the file fixes the problem, also clicking on the file shows a message asking you to reload the file, etc. There are small differences in different OS but as a whole the file can be recovered.

Since the message advices you to do File -> Refresh (which does not work) I reopen the bug, but reduce severity from blocker to minor.

[Sylvia Tancheva]
Comment 8 Beat Knoblauch CLA 2009-08-28 01:53:25 EDT
First of all: Eclipse (PDT) is fantastic, but ...

The issue of bug 262178 is really a pain for php-developers moving projects from local to web and back, e.g. different locations.

Imagine having 4 to 5 files open in the workspace, you have to step from file to file an "refresh" and reopen each file.

After having moved projects back from web, the procedure has to be repeated.

The version 3.3.0 was fine, but after that version this bug was introduced and stayed until today.
Comment 9 Michael Spector CLA 2009-11-03 07:59:30 EST
Created attachment 151180 [details]
patch

Here's a backport from JDT that fixes this issue (in DLTK).
Comment 10 Michael Spector CLA 2009-11-03 08:01:17 EST
Fixed in CVS (HEAD).