如何在Eclipse中禁用基于文件特定的编译器警告? [英] How can I disable compiler warnings in Eclipse on a file specific basis?
问题描述
在我的Eclipse项目中有一些生成的.java文件,我需要为SQLJ使用,我不能移动到一个单独的项目(由于管理开销)。这些文件也定期重新生成,所以编辑它们是不幸的。
In my Eclipse project are a handful of generated .java files that I need to use for SQLJ and I can't move to a separate project (due to Administrative Overhead). These files are also regularly regenerated so editing them is unfortunately out.
不幸的是,这些文件生成几百个java编译器警告,淹没了有用的警告,我得到的文件,我实际上可以编辑。
Unfortunately these files generate a few hundred java compiler warnings which drown out the useful warnings I get on files that I actually can edit.
Eclipse中有没有办法说明忽略逐个文件的所有警告?
Is there any way in Eclipse to say Ignore all the warnings of a file-by-file basis? Or can I block out a specific sub-directory?
推荐答案
在eclipse中的问题视图可以被过滤;我总是将它设置为在所选元素及其子元素。当然,这更多的是一种解决方法,但它减少了在同一个项目中的文件的影响。 (请注意,即使您必须在同一个项目中使用它们,也可以将它们保存在单独的源文件夹中)。
The "problems" view in eclipse can be filtered; I always have it set to "on selected element and its children only". Granted, this is more of a work-around, but it lessens the impact of having the files in the same project. (Note that even if you must have them in the same project, you can keep them in a separate source folder).
编辑:要配置过滤器,带有向下箭头,并且在问题视图的右上角有工具提示查看菜单。点击它,然后点击配置内容。
To configure the filters, find the icon with a downward arrow with tooltip "View Menu" on the top right of the problems view. Click it, and then click "configure contents".
这篇关于如何在Eclipse中禁用基于文件特定的编译器警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!