避免“资源与文件系统不同步” [英] Avoiding "resource is out of sync with the filesystem"

查看:578
本文介绍了避免“资源与文件系统不同步”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了Java代码,并定期收到以下消息:


资源与文件系统不同步


右键单击>刷新将始终清除此。



但是为什么当它找到这个条件时,Eclipse不能自动刷新?有没有需要资源不同步的情况?



如果有这样的条件,并且不适用于我的工作,有没有办法让Eclipse在遇到此状态时自动刷新? (我感觉到它应该在正常开发中刷新一点,以提高人类开发人员的表现)。



更新(2012-06-25):
我的最新更新(版本:Indigo发行版本号:20110615-0604)
不再显示
首选项 - 常规 - 工作区 - 自动刷新
有一个选项刷新访问我应该使用这个?

解决方案

您可以在Window - 首选项 - 常规 - 工作区 - 自动刷新(称为在新版本中刷新使用本机钩子或轮询



我认为默认情况下未启用的唯一原因是性能相关。 >

例如,自动刷新源文件夹可能会触发工作区的构建。也许有些人想要更多的控制这个。



还有一个 Eclipse网站上的文章关于自动刷新。



基本上,没有外部触发器通知Eclipse在工作空间之外更改的文件。相反,Eclipse使用后台线程来监视可能导致大工作空间性能问题的文件更改。


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

resource is out of sync with the filesystem.

Right-click > Refresh will always clear this.

But why can't Eclipse refresh automatically when it finds this condition? Are there cases where you want the resource to be out of sync?.

If there are such conditions and they don't apply to my work, is there a way of getting Eclipse to refresh automatically when it encounters this state?. (I appreciate that it should refresh as little as it needs to in normal development to increase performance for human developers.)

UPDATE (2012-06-25): My latest update (Version: Indigo Release Build id: 20110615-0604) no longer shows Preferences - General - Workspace - Refresh Automatically There is an option "Refresh on access" - should I use this?

解决方案

You can enable this in Window - Preferences - General - Workspace - Refresh Automatically (called Refresh using native hooks or polling in newer builds)

The only reason I can think why this isn't enabled by default is performance related.

For example, refreshing source folders automatically might trigger a build of the workspace. Perhaps some people want more control over this.

There is also an article on the Eclipse site regarding auto refresh.

Basically, there is no external trigger that notifies Eclipse of files changed outside the workspace. Rather a background thread is used by Eclipse to monitor file changes that can possibly lead to performance issues with large workspaces.

这篇关于避免“资源与文件系统不同步”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆