IntelliJ IDEA
 
Get IntelliJ IDEA
You are viewing the documentation for an earlier version of IntelliJ IDEA.

Auto import

Last modified: 11 February 2024

If you're using a class, a static method, or a static field that you haven't imported yet, the IDE shows you a tooltip prompting to add a missing import statement so that you don't have to add it manually. Press AltEnter to accept the suggestion.

If there's more than one possible source of import, pressing AltEnter will open the list of suggestions.

To change the background color for import tooltip, press CtrlAlt0S and go to Editor | Color Scheme | General | Popups and Hints | Question hint.