auto-import choosing broken (for me)

When I have a Class name in red, I used to be able to mouse-over it (or something -- I never could figure out the logic definitively) and see a guess or several offered for adding an import to the right class automatically.  ALT+enter (or CMD+enter... I have no idea) used to select this suggestion.  Now, however, the same key stroke simply dismisses the suggestion and no import suggestions are ever offered again for the class.

What is/was this function I used to invoke by ALT+enter or CMD+enter, and how can I restore its working order?

tone

9 comments

Hi Anthony,

What is your OS, java and IJ version?

Denis

0

IDEA 12.0.4

OS X 10.8.2
Java 1.6.0_37

I get the little blue popup with a ? in the upper left along with the classname that I'd actually like to import.  Clicking it does nothing.  Whatever keystroke (some mod key plus enter, as I recall) I previously used does nothing.

tone
0

Please check that you haven't accidentally removed target class/package from completion (IDE Settings | Editor | Auto Import | Exclude from Import and Completion)

Denis

0

This is apparently not the issue.  Nothing is excluded there.

Is there a key binding that is supposed to allow me to select this?
It does print the non-interactive blue bar with the qualified  class name and a "?", and the red light bulb sometimes appears maddeningly far to the left.

tone

0

Yes, it's possible to add a class/package to exclude list from 'auto-import menu':

auto-import.png

  • try to execute Main Menu | File | Invalidate Caches;
  • are there any exceptions at idea.log?
  • could you provide a sample project which illustrates the problem?


Denis

0

Nothing is excluded according to prefs.
A search for "ception" in idea.log gives nothing.
I can supply a project, but it is quite large -- is 200MB inconvenient or shall I upload it somewhere?

tone

0

Anthony, could you please also make sure that Settings | Editor | Auto Import | Show import popup option is enabled?

0

This thread is a little old but I thought I would reply for posterity's sake.

I had the very same problem and it was driving me crazy for several days.  It turns out that I had unknowingly turned on "Power Save Mode"  (Menu -> File -> Power Save Mode)  Once I turned that off, my auto import started working again.

Feature request for the next version: allow the user to permanently disable "Power Save Mode" or bury it in the settings panel so that it cannot be inadventantly selected.

0

Please sign in to leave a comment.