Eclipse 中的包资源管理器视图
我正在 Eclipse 中开发一个项目。通常,只要特定文件中存在编译错误,Package Explorer 视图中的文件名就会显示为红色框和十字。这有助于轻松找到存在编译错误的文件。但是,在一个特定项目中,我有一些存在编译问题的文件,但这些文件在包资源管理器中没有以红色显示。只有当我在 eclipse 中打开文件时,我才会看到编译错误。此外,这种行为仅发生在一个项目中。其他项目在包视图中正确显示编译错误。知道为什么会发生这种情况吗?
I am working on a project in Eclipse. Usually, whenever there are compilation errors in a particular file, the file name in the Package Explorer view is shown with a red box and a cross. This helps to find files with compilation errors easily.However, in one particular project, I have some files with compilation problems, but those are not shown with red in the package explorer. Only when I open the files in eclipse, do I see the compilation errors. Also, this behavior is happening only in one project. Other projects are showing compilation errors properly in the package view. Any idea why this is happening ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
项目中是否存在错误红叉?
检查问题视图。 (窗口 -> 显示视图 -> 问题)
可能存在构建路径错误,或项目级别的其他错误。
Is there an error red cross on the project?
Check the Problems view. (Window -> Show View -> Problems)
It could be that there is a build path error, or another error at the project level.
我经常发现“清理”项目有助于在包资源管理器中显示这些错误。转到项目 -> Clean...并选择您要重新编译的项目。
Often I've found that "cleaning" the project helps show those errors in the package explorer. Go to Project -> Clean... and select the projects you want to recompile.
此外,使用错误视图直接跳转到错误源可能会更容易,而无需使用包资源管理器进行冗长的操作。
Also it might even be easier to use the error view to jump directly to the source of your error without the lengthy way using the package explorer.