IntelliJ Idea,不管不相关的项目文件中的错误如何运行代码 [英] IntelliJ Idea, run code regardless of errors in unrelated project files

查看:46
本文介绍了IntelliJ Idea,不管不相关的项目文件中的错误如何运行代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Eclipse 中遗漏的一件事是,如果我的项目中一些完全不相关的文件包含错误,我将无法运行用于测试各种事物的代码(想想简短的 main()).我在 FAQ 中读到我可以使用带有 -proceedOnErrors 参数的 Eclipse 编译器,但它仍然不起作用.临时修复未完成的代码进行编译并不是我真正想要的.

One thing that I miss from Eclipse is that I can't run code for testing various things (think short main()) if some totally unrelated files in my project contain errors. I've read in FAQ that I can use Eclipse compiler with -proceedOnErrors argument but it still doesn't work. Temporarily fixing unfinished code to compile is not really what I want.

我应该注意到我也使用 Scala 插件,但我的大部分代码仍然是 Java 文件.

I should note that I use Scala plugin too but still majority of my code are Java files.

推荐答案

修改您的配置以使用 Make, no error check 选项而不是 Make.

Modify your configuration to use Make, no error check option instead of Make.

有关详细信息请参阅此答案

请注意,这在您的用例中可能还不够.最后的方法是使用 Vics 答案 提供的解决方案.

Note that this may not be enough in your use case. Last resort is to use the solution provided by Vics answer.

这篇关于IntelliJ Idea,不管不相关的项目文件中的错误如何运行代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆