如何在特定文件的基础上禁用 Eclipse 中的编译器警告?

2023-10-15Java开发问题
4

本文介绍了如何在特定文件的基础上禁用 Eclipse 中的编译器警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

在我的 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 中有什么方法可以说 Ignore all the warnings of a file-by-file based?或者我可以屏蔽一个特定的子目录吗?

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 中的编译器警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

如何使用 JAVA 向 COM PORT 发送数据?
How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)...
2024-08-25 Java开发问题
21

如何使报表页面方向更改为“rtl"?
How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)...
2024-08-25 Java开发问题
19

在 Eclipse 项目中使用西里尔文 .properties 文件
Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)...
2024-08-25 Java开发问题
18

有没有办法在 Java 中检测 RTL 语言?
Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)...
2024-08-25 Java开发问题
11

如何在 Java 中从 DB 加载资源包消息?
How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)...
2024-08-25 Java开发问题
13

如何更改 Java 中的默认语言环境设置以使其保持一致?
How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)...
2024-08-25 Java开发问题
13