Key Shortcut for Eclipse Imports

后端 未结 9 1195
我寻月下人不归
我寻月下人不归 2021-01-30 00:41

It\'s been a while since I last used Eclipse. I used to love this handy key shortcut that added all the imports to the top of the source file, but I\'ve forgotten it. Does any

相关标签:
9条回答
  • 2021-01-30 01:14

    Some useful shortcuts. You're looking for the 1st one...

    1. Ctrl + Shift + O : Organize imports
    2. Ctrl + Shift + T : Open Type
    3. Ctrl + Shift + F4 : Close all Opened Editors
    4. Ctrl + O : Open declarations
    5. Ctrl + E : Open Editor
    6. Ctrl + / : Line Comment
    7. Alt + Shift + R : Rename
    8. Alt + Shift + L : extract to Local Variable
    9. Alt + Shift + M : extract to Method
    10. F3 : Open Declaration

    Source Here

    0 讨论(0)
  • 2021-01-30 01:15

    You also can enable this import as automatic operation. In the properties dialog of your Java projects, enable organize imports via Java Editor - Save Action. After saving your Java files, IDE will do organizing imports, formatting code and so on for you.

    0 讨论(0)
  • 2021-01-30 01:28

    CTRL + 1 can also be used which will suggest to import.

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