Optimize imports "on the fly" isn't working in IDEA 10.x

Ever since I upgraded to IDEA 10.x the optimize imports "on the fly" feature isn't working for me.  I found where to turn it on in Settings - IDE Settings - Editor - Auto Import, so that isn't the issue.  Imports are added as classes are introduced into a file, but they aren't removed if the class is later removed.  They grey out and get highlighted like warnings, but they used to be removed.  Is anyone else having this issue?  Is there some other setting that could conflict with the automatic removal that needs to be set?  Thanks.

2 comments
Comment actions Permalink

Hello Steve,

Please check if there are any exceptions in idea.log (Help | Reveal Log to
see where it is)

Ever since I upgraded to IDEA 10.x the optimize imports "on the fly"
feature isn't working for me.  I found where to turn it on in Settings
- IDE Settings - Editor - Auto Import, so that isn't the issue.
Imports are added as classes are introduced into a file, but they
aren't removed if the class is later removed.  They grey out and get
highlighted like warnings, but the used to be removed.  Is anyone else
having this issue?  Is there some other setting that could conflict
with the automatic removal that needs to be set?  Thanks.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

OK, I think I figured this out.  There were some errors in the files I was editing (based on my inspection profile).  The "on the fly" feature doesn't seem to remove imports automatically if there are any such errors (even if they are JavaDoc and not related to compilation).  If the file is error free, it will then remove imports "on the fly" properly.

0

Please sign in to leave a comment.