简体   繁体   English

Eclipse 中的 Package 资源管理器视图

[英]Package explorer view in Eclipse

I am working on a project in Eclipse.我正在 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.通常,每当特定文件中出现编译错误时,Package 资源管理器视图中的文件名都会显示为红色框和叉号。 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.这有助于轻松找到存在编译错误的文件。但是,在一个特定项目中,我有一些存在编译问题的文件,但在 package 资源管理器中,这些文件没有显示为红色。 Only when I open the files in eclipse, do I see the compilation errors.只有当我打开 eclipse 中的文件时,我才会看到编译错误。 Also, this behavior is happening only in one project.此外,这种行为只发生在一个项目中。 Other projects are showing compilation errors properly in the package view.其他项目在 package 视图中正确显示编译错误。 Any idea why this is happening?知道为什么会这样吗?

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.可能是构建路径错误,或者项目级别的另一个错误。

Often I've found that "cleaning" the project helps show those errors in the package explorer.我经常发现“清理”项目有助于在 package 资源管理器中显示这些错误。 Go to Project -> Clean... and select the projects you want to recompile. Go 到 Project -> Clean... 和 select 要重新编译的项目。

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.此外,使用 package 资源管理器,使用错误视图直接跳转到错误源甚至可能更容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM