How to disable auto delete unused imports?

Answered

I accidentally clicked a button and it make some change to Intellj setting. One symptom of the change is unused imports will be automatically deleted, but Intellj can't do it correctly, so it is killing me.

Is there a way to disable auto delete for unused imports? or is there a way to check the setting change log of Intellij? Thanks a lot. 

2
2 comments

Make sure the following setting is disabled:

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

 

Other places to check:

File | Settings | Version Control | Commit

File | Settings | Tools | Actions on Save

0

Please sign in to leave a comment.