如何让 Intellij Idea 显示编译警告? [英] How to get Intellij Idea to display compilation warnings?
问题描述
我正在使用 Intellij Idea 10 和 Java 6 JDK Update 7.当我运行 Build -->Rebuild Project
命令,并且 (javac) 编译生成警告,Idea 不会在 Messages
视图中显示什么这些警告.我只看到一个信息:XX 警告"节点,但无法展开它以查看实际警告.或者我只是在状态栏上看到一条消息编译成功完成,但出现 XX 警告".对于错误,Idea 会自动显示错误信息(错误信息、文件名、行号等).我怎样才能让它与警告类似地工作?
I'm working with Intellij Idea 10 and Java 6 JDK Update 7. When I run Build --> Rebuild Project
command, and the (javac) compilation generates warnings, Idea doesn't display what those warnings exactly are in the Messages
view. I just see an "Information: XX warnings" node, but no way to expand it to see the actual warnings. Or I just see a message "Compilation completed successfully with XX warnings" on the status bar. For errors, Idea displays the error information (error message, filename, line number etc.) automatically. How can I get it to work similarly with warnings?
(作为记录,我已经尝试使用其他命令行参数,例如 -Xlint
,但它没有任何区别.)
(For the record, I've already tried using additional command line parameters such as -Xlint
, but it does not make a difference.)
推荐答案
确保消息面板中的隐藏警告"选项禁用强>在左边:
Make sure that "Hide Warnings" option is disabled in the Messages panel on the left:
这篇关于如何让 Intellij Idea 显示编译警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!