如何隐藏 Eclipse 项目中的所有错误?

发布于 2024-12-29 04:51:55 字数 150 浏览 1 评论 0原文

我从我的一位朋友那里接手了一个巨大的项目,我只想查看这些文件以了解他们实现的一些编码架构。在我的系统上,我没有这些 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

め可乐爱微笑 2025-01-05 04:51:55

我不知道您是否可以隐藏所有错误,但您可以

  • 首选项 -> 中限制报告问题的数量。 Java->编译器->构建,或
  • 排除构建路径文件夹中的所有文件(Java 构建路径 -> 源 -> 选择源文件夹并编辑... -> 输入文件夹名称并按下一步 ->添加“**”作为排除模式

I don't know if you can hide all the errors but you can

  • limit the number of reported problems in Preferences -> Java -> Compiler -> Building, or
  • exlude all the files from your build path folder (Java Build Path -> Souce -> Select source folder and Edit... -> Enter folder name and press Next -> Add '**' as Exclusion pattern)
旧瑾黎汐 2025-01-05 04:51:55

只需在 Properties -> 中禁用 JavaBuilder 即可。建设者。有时禁用 JavaBuilder 后错误状态不会更新(它们仍然可见)。在这种情况下,请执行以下操作:

  1. Properties -> Java 构建路径 -> Source 删除源文件夹
  2. 使用 Build -> 清除项目清除...
  3. 如上所述禁用 JavaBuilder
  4. 再次添加源文件夹

这样您就不会再因错误消息而烦恼,而是保留通过 ctrl+ 导航的所有可能性单击、搜索参考文献等。

Just disable JavaBuilder in Properties -> Builders. Sometimes after disabling JavaBuilder error status is not updated (they are still visible). In that case do the following:

  1. In Properties -> Java Build Path -> Source remove source folder(s)
  2. Clear project using Build -> Clear...
  3. Disable JavaBuilder as described above
  4. Add source folder(s) again

That way you should not be irritated with error messages any longer, but retaining all the possibilities to navigate by ctrl+click, search references etc.

烟雨扶苏 2025-01-05 04:51:55

这不是正确的方法,如果您只想浏览源代码而不担心编译和构建它,这只是一种解决方法。

您只需删除 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.

旧街凉风 2025-01-05 04:51:55

在日食中,继续任何课程。右键单击垂直标尺上显示的红色标记并禁用 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.

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文