如何隐藏 Eclipse 项目中的所有错误?
我从我的一位朋友那里接手了一个巨大的项目,我只想查看这些文件以了解他们实现的一些编码架构。在我的系统上,我没有这些 jar 和完整的代码,因此我的 Eclipse 显示了近 10,000 个错误。现在我仍然能够浏览代码,但是红色错误不允许我集中注意力。如何隐藏这个特定项目中的所有错误?
I have taken a huge project from one of my friends and I just want to view the files just to understand some coding architectures they have implemented. On my system I don't have those jars and complete code so my Eclipse is showing almost 10,000 errors. Now I am still able to go through the code but the red errors are not allowing me to concentrate well. How can I hide all the errors in this particular project?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我不知道您是否可以隐藏所有错误,但您可以
首选项 -> 中限制报告问题的数量。 Java->编译器->构建
,或Java 构建路径 -> 源 -> 选择源文件夹并编辑... -> 输入文件夹名称并按下一步 ->添加“**”作为排除模式
)I don't know if you can hide all the errors but you can
Preferences -> Java -> Compiler -> Building
, orJava Build Path -> Souce -> Select source folder and Edit... -> Enter folder name and press Next -> Add '**' as Exclusion pattern
)只需在
Properties -> 中禁用
JavaBuilder
即可。建设者。有时禁用JavaBuilder
后错误状态不会更新(它们仍然可见)。在这种情况下,请执行以下操作:Properties -> Java 构建路径 -> Source
删除源文件夹Build -> 清除项目清除...
JavaBuilder
这样您就不会再因错误消息而烦恼,而是保留通过 ctrl+ 导航的所有可能性单击、搜索参考文献等。
Just disable
JavaBuilder
inProperties -> Builders
. Sometimes after disablingJavaBuilder
error status is not updated (they are still visible). In that case do the following:Properties -> Java Build Path -> Source
remove source folder(s)Build -> Clear...
JavaBuilder
as described aboveThat way you should not be irritated with error messages any longer, but retaining all the possibilities to navigate by ctrl+click, search references etc.
这不是正确的方法,如果您只想浏览源代码而不担心编译和构建它,这只是一种解决方法。
您只需删除 java 构建路径中的源文件夹,这将帮助您摆脱那些使源代码变得混乱的红色错误。
右键单击“项目”->“属性”->“Java 构建路径”->在“源”选项卡中选择源文件夹并单击“删除”。
重新启动 Eclipse。
This is not the right way , just a workaround if you just want to browse the source code and not worried about compile and building it.
You just need to remove the source folder in the java build path , this will help you to get rid of those red errors that clutter your source.
Right click on Project->Properties->Java Build Path->in Source tab select your source folder and click remove.
Restart your eclipse.
在日食中,继续任何课程。右键单击垂直标尺上显示的红色标记并禁用 3 个选项。见下文。
In eclipse, go on any class. Right click on the red marks shown on the vertical ruler and disable the 3 options. See below.