IntelliJ IDEA
 
Get IntelliJ IDEA

Auto import

Last modified: 11 October 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 you 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 the import tooltip, press CtrlAlt0S and go to Editor | Color Scheme | General | Popups and Hints | Question hint.