如何关闭 Eclipse 警告“从未使用过导入"? [英] How to turn off Eclipse warning "The import is never used"?

查看:22
本文介绍了如何关闭 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.

这篇关于如何关闭 Eclipse 警告“从未使用过导入"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆