Root cause of 'Resource out of sync with the file system'
It is likely that you would have edited the file from outside eclipse environment and hence when you try to access the file from eclipse after this, you would get this problem.
Solution for 'Resource out of sync with the file system'
- Right click on the file from within eclipse.
- Click Refresh
- Now try to open the file in eclipse again.
- Error is gone!
- You can got Windows. Point to Preferences. Click on General. Go to Workspace and check the box ' Refresh Automatically' as shown in the figure below. The problem 'Resource out of sync with the file system' would never pop in again!