如何使用Eclipse删除未使用的导入而不进行重组? [英] How to remove unused imports using Eclipse and not reorganize it?

查看:71
本文介绍了如何使用Eclipse删除未使用的导入而不进行重组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

组织导入(< Ctrl> +< Shift> + O )是Eclipse的众所周知的功能.
我如何才能只删除未使用的导入,而不能对其进行重组(不展开.*且不更改行顺序)?

Organize imports (<Ctrl>+<Shift>+O) is well known feature of Eclipse.
How could I remove only unused imports, but not reorganize it (not unfold .* and not change line ordering)?

推荐答案

您可以尝试菜单源/清理/使用自定义配置文件",并将其配置为仅执行删除未使用的导入".

You can try menu Source / Clean Up / Use custom profile and configure it to only do the "Remove unused imports".

这篇关于如何使用Eclipse删除未使用的导入而不进行重组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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