How to turn off Eclipse warning quot;The import is never usedquot;?(如何关闭 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 警告“从未使用过导入"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何关闭 Eclipse 警告“从未使用过导入"?
基础教程推荐
- 从 python 访问 JVM 2022-01-01
- 多个组件的复杂布局 2022-01-01
- 在 Java 中创建日期的正确方法是什么? 2022-01-01
- 大摇大摆的枚举 2022-01-01
- 如何在 Spring @Value 注解中正确指定默认值? 2022-01-01
- 如何在 JFrame 中覆盖 windowsClosing 事件 2022-01-01
- Java 实例变量在两个语句中声明和初始化 2022-01-01
- Java Swing计时器未清除 2022-01-01
- 验证是否调用了所有 getter 方法 2022-01-01
- 不推荐使用 Api 注释的描述 2022-01-01
