IntelliJ Idea 12: How do I auto import namespaces?

前端 未结 4 1873
遥遥无期
遥遥无期 2020-12-16 09:22

In Eclipse, I can hit the Ctrl+Shift+O shortcut to auto import namespaces. How do I do it in IntelliJ IDEA Community Edition?

4条回答
  •  时光取名叫无心
    2020-12-16 10:03

    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

提交回复
热议问题