全局搜索时,报这个错误,如下:
问题:全局搜索时,弹出错误对话框,关闭对话框不影响搜索的执行。
出现原因:Resource is out of sync with the file system文件系统不同步,在Eclipse中,工程文件是由Eclipse自动扫描添加的,如果在外部修改了resource目录中的文件,却又关闭了自动刷新的功能,则会引起文件不同步,从而会报错,此外,有时候在没有修改Eclipse中的文件也有可能引起这样的功能。
解决办法:
方法一:手动刷新整个项目
方法二:配置Eclipse,自动刷新
a)eclipse启动时,刷新workspace,即勾选:window—>preferences—>general—>startup and shutdown—>refresh workspace on startup;
b)window—>preferences—>general—>workspace中:勾选选项:refresh using native hooks or polling和refresh on access;