如何关闭 Eclipse 警告“从未使用过导入"?

2022-01-16 00:00:00 warnings eclipse-plugin eclipse

我在项目中有很多此类警告,我想将其关闭.我对删除这些导入不感兴趣,所以请不要告诉我该怎么做.

I have a lot of this warnings in project and I would like to turn it off. I'm not interested in removing those imports, so please don't tell me how to do it.

我使用的是 eclipse 3.4.2.

I'm using eclipse 3.4.2.

推荐答案

要更改整个工作区:

Window > Preferences > Java > Compiler > Errors/Warnings > Unused Import > Ignore.

Window > Preferences > Java > Compiler > Errors/Warnings > Unused Import > Ignore.

要覆盖单个项目的工作区设置:

To override workspace settings for a single project:

项目 > 属性 > Java 编译器 > 错误/警告 > 未使用的导入 > 忽略.

Project > Properties > Java Compiler > Errors/Warnings > Unused Import > Ignore.

相关文章