intellij-idea

How to prevent IntelliJ IDEA from deleting unused packages?


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?


Solution

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

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