Code > Optimize Imports will provide you the behavior you are after. If you want to adjust the settings you can so via Settings > Editor > Auto Import.
6
votes
You can type AltEnter to show a dropdown of possible classes to auto-import, it's similar to Eclipse.
I found this in Android Studio on Mac OS X - if I mouse over the class name it can't find, you get a suggestion pop-up that shows this shortcut
1
votes
You can try this: "Ctrl+Alt+O" .
0
votes
IntelliJ ShortCut depends on Keymap:
You can customize shortcut for your favorite commands.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more
ctrl+alt+o
– Abhijeet