Does Visual Studio Code have an auto-import feature for Java??

前端 未结 2 1921
余生分开走
余生分开走 2021-02-07 05:18

Does VS Code have an auto-import function or hot key for Java?

I installed Java Extension Pack but I found that I need to import every library manually.

相关标签:
2条回答
  • 2021-02-07 05:26

    For organize imports inside a java file

    press SHIFT+ ALT + O

    The vscode has also the option of enable auto organize imports on save action

    0 讨论(0)
  • 2021-02-07 05:41

    A) in order to have everything working just like intellij or eclipse, there is an extension, install it, Ctrl+Shift+P ==> then write create java project.

    B) now that you have the project scaffold right, just right click on the editor, choose source action, then organize imports and select the right libraries to be imported.

    0 讨论(0)
提交回复
热议问题