2010-09-29 15:31 阅读 47


I am having problem with my Eclipse PDT version. I keeps opening older version of a file until I close it and open it again.

So what is happening. I edit a file with Eclipse - test.php. I close it. Then I compare it (test.ph) with another one in WinMerge, save the changes and when I open the file again in Eclipse it is still the same as it was before I changed it in WinMerge. I have to close the Eclipse and start it again to be able to open the file with it latest modifications.

I have noticed the same problem when I am opening a file downloaded from FileZilla. I have a local copy of the file that is online opened in Eclipse, then someone changed the file online. I right click -> "View/edit" from FileZilla, choosing to overide the old local file with the one online, but then I see the old file again, without the changes. I am sure that there are changes cause when I downlaod the file somewhere and open it , I see them.

Is there something like a cache in the Eclipse that may prevents me from viewing the latest changes. I seems that is happens only when the changes were made outside/not usign Eclipse. Any ideas?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

3条回答 默认 最新

  • 已采纳
    duanbeng8872 duanbeng8872 2010-09-30 08:32

    Is there any way to open a file outside the project without it being cached and to be able to reopen it and see the actual code?

    This is a huge disadvantage of the Eclipse. I do not know how things like this could be left the way they are?

    点赞 评论 复制链接分享
  • dongliang7545 dongliang7545 2010-09-29 15:38

    Yes, Eclipse likes caching a lot... one of the reasons I hate it.

    You should be able to have Eclipse auto-refresh your files in the Preferences window in the Window menu (type Refresh to show up the relevant pages). In my not so recent version of Eclipse, I have to put checkmarks on these:

    • Refresh workspace on startup (in Startup and Shutdown)
    • Refresh automatically (in Workspace)
    点赞 评论 复制链接分享
  • dsd57259 dsd57259 2011-04-20 06:08

    The answer given by Archimedix solved a similar problem (in Java) that I have where the config files (hbm config and log4j) that I have modified in the eclipse editor are not being copied to the output folder. Instead an older version of the file is being copied every time I compile. I followed Archemedix solution, however, note that you still need to restart eclipse for it to take effect. After restarting eclipse, during compilation, any changes I make to the config files are now being copied to the output folder and not the old version.

    点赞 评论 复制链接分享