IntelliJ IDEA Scala插件未发现错误 [英] IntelliJ IDEA Scala plugin doesn't find errors
问题描述
我刚刚使用Scala插件尝试了IntelliJ IDEA 12,但是它找不到并突出显示我的代码中的错误.例如,我可以在方法中编写任意代码,看起来一切都很好. IDEA无法执行此操作吗?还是我必须配置一些特殊的东西?
I've just tried IntelliJ IDEA 12 with the Scala plugin, but it doesn't find and highlight errors in my code. I can for example write arbitrary code in a method and it looks like everything is fine. Is IDEA not able to do this? Or do I have to configure something special?
推荐答案
IDEA的Scala插件在对源代码进行类型检查时不等同于编译器,但效果很好.您想要做的一件事(除非您的硬件不是最新的高性能),否则请打开"Type-Aware Highlighting".
IDEA's Scala plug-in is not equivalent to the compiler in type-checking your source code, but it does pretty well. The one thing you'll want to do (unless, perhaps, your hardware is not fairly current and high-performance) is turn on "Type-Aware Highlighting."
如果您在IDEA窗口的右下角查看(当您编辑启用了Scala的项目时),您会看到两个图标之一,两个图标都以方括号括起来一点文字.该文本在黄色背景上为空白,在绿色背景上为字母T
.单击它可在这两种状态之间切换.当显示绿色T
时,"Type-Aware"突出显示.
If you look in the lower-right-hand corner of the IDEA window (when you're editing a project with Scala enabled) you'll see one of two icons, both of which take the form of a square-bracketed bit of text. That text is either blank on a yellow background or the letter T
on a green background. Clicking it toggles between those two states. When the green T
is displayed, Type-Aware highlighting is on.
尝试一下.
这篇关于IntelliJ IDEA Scala插件未发现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!