Eclipse 消除因未编译代码而导致的错误

发布于 12-18 07:30 字数 170 浏览 2 评论 0原文

我有一些代码无法编译(您必须从控制台执行才能编译)。不过我想在调试中使用它。当我有大约 100 个错误时,这非常有效,然后我可以从错误视图中删除它们。然而,当错误控制台中有大约 60 000 个错误时,这是​​不可能的。

如何从错误视图中删除 60 000 个错误或使 Eclipse 不在错误视图中显示错误?

I have some code that does not compile (you have to execute from console to make it compile). However I would like to use it in debug. this works great when I have like 100 errors then I can just delete them from Errors View. However when there is like 60 000 Errors in Error Console this is not possible.

How to remove 60 000 Errors from Error View or make Eclipse not show errors in Error View?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

止于盛夏2024-12-25 07:30:01

理想情况下,您应该修复项目设置以使代码在 Eclipse 中编译。

关于错误视图中项目的可见性,您可以使用过滤器(右上角带有箭头的按钮)来控制显示哪些错误。

Ideally you should fix your project setup to make the code compile within Eclipse.

Regarding the visibility of items in the error view, you can play around with the filters (button with arrows on the top right) to control which errors are shown.

锦爱2024-12-25 07:30:01

一种可能的解决方案是过滤错误视图;单击右侧的向下箭头并配置内容。然后选择对话框右侧的范围。我经常发现将范围限制为所选元素和子元素很有用,但在您的情况下,更明确地设置它可能会很有用。

另一种可能的解决方案是将所有需要处理的内容放在单独的项目中(而不是在源文件夹中),这会生成您可以依赖的输出(例如 jar 文件)。

One possible solution is to filter the error view; click the downarrow on the right and configure contents. Then select select the scope on the right hand side of the dialog. I often find it useful to limit the scope to the selected element and children, but in your case it might be useful to set it more explicitly.

Another possible solution would be to have all that requires processing be in a separate project (and not in a source folder), which produces an output that you can depend on (such as a jar file).

撕心裂肺的伤痛2024-12-25 07:30:01

如果您不关心查看编译错误,您可以完全关闭问题选项卡。

或者把所有不能编译的代码都拿出来——在外部编译成jar,并将jar包含在项目中。

If you do not care about viewing complilation errors, you could just close the problem tab completely.

Or take out all the code that does not complile - compile it externally into a jar, and include the jar in the project.

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