如何防止 IntelliJ IDEA 删除未使用的包? [英] How to prevent IntelliJ IDEA from deleting unused packages?

查看:35
本文介绍了如何防止 IntelliJ IDEA 删除未使用的包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 intelliJ,我的问题是当我开始将一些临时未使用的包导入到我的类文件中时,intellij 会在一秒钟内删除这些行.

I'm working with intelliJ and my problem is when I start to import some temporary unused packages into my class file intellij delete those line within a second.

如何关闭这个不太好的功能?

how can I turn off this not so nice feature?

推荐答案

禁用 File |设置 |编辑器 |通用 |自动导入 |即时优化导入.

Disable File | Settings | Editor | General | Auto Import | Optimize imports on the fly.

通常您不需要手动添加导入,IDEA 会为您完成.

Normally you don't need to add imports manually, IDEA does it for you.

这篇关于如何防止 IntelliJ IDEA 删除未使用的包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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