Optimize on-the-fly imports not working

I want the import to be deleted immediately after they become unused, so I checked Editor | General | Auto Import | Optimize imports on the fly, but it does not work.

+4
source share
2 answers

If Optimize imports on the flyselected in the way you did, then unused imports must be deleted automatically if:

  • the file is recognized as a java file (it is in the package under Source Route.

and

  1. the file is somehow modified (press Enter on the black line anywhere in the file, this will lead to optimization of the import).

, ctrl + alt + O, (, svn).

+2

, Java | Imports Unused import (editor light) .

+1

All Articles