Key Shortcut for Eclipse Imports

后端 未结 9 1194
我寻月下人不归
我寻月下人不归 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:01

    Ctrl + Shift + O (<-- an 'O' not a zero)

    Note: This shortcut also removes unused imports.

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

    Some other useful shortcuts:

    1. Alt + Shift + R : Rename
    2. Alt + Shift + Y : Word wrap
    3. Alt + Shift + V : Move the selected elements
    4. Alt + Shift + I : Inline refactoring
    5. Alt + Shift + M : Extract Method refactoring.
    6. Alt + Shift + L : Extract Local Variable
    7. Alt + Shift + A : Block selection mode
    8. Alt + Shift + Arrow Keys: selects enclosing elements
    9. Alt + Shift + F1: Focus on eclipse element to know plugin implementation details.
    10. Alt + Shift + F2: Plugin implementation details.
    11. F4 : Type Hierarchy
    12. Ctrl + Shift + T : Open Type
    13. Ctrl + Shift + H: Open Type in Hierarchy
    14. Ctrl + Alt + H: Call Hierarchy
    15. Ctrl + Shift + G: Reference in workspace
    16. Ctrl + Alt + G: Quick Search for selected text
    17. Ctrl + Shift + O: Organize imports
    18. Ctrl + Shift + M: Add import for currently selected.
    19. Ctrl + Shift + L: Shows you a List of your currently defined shortcut keys
    20. Ctrl + Shift + U: Occurrence in current file
    21. Ctrl + Shift + A: Open plug-in Artifact
    22. Ctrl + Shift + {: Two side by side editors with current file
    23. Ctrl + Shift + Space : Parameter Hints
    24. Ctrl + Shift + Mouse hover : To view javadoc
    25. Shift + Mouse hover : To view source code
    26. Ctrl + Space : Content Assist
    27. Ctrl + F3/O : Outline
    28. Ctrl + T: Type Hierarchy
    29. Ctrl + H : Open Search Dialog
    30. Ctrl + 1 : Quick Fix
    31. Ctrl+Shift+NUM_KEYPAD_DIVIDE : Collapse All code blocks
    32. Ctrl+Shift+NUM_KEYPAD_MULTIPLY : To open all code blocks
    33. Alt + left arrow : Open recently closed file

    Ctrl+Shift+ any key :Direct actions (on text mostly)

    Alt+Shift+ any key : Indirect actions


    Ctrl It was originally used to send Control character to terminals. Ctrl commands are commonly used shortcuts. (In Mac Command)

    Alt It enables alternate uses for other keys.


    The above shortcuts are default, if we want to change shortcuts we can do. In eclipse -> Windows -> preferences -> keys. Where we can find all shortcuts with full details:

    and
    https://shortcutworld.com/IntelliJ-IDEA/win/IntelliJ_Shortcuts https://shortcutworld.com/Eclipse/win/Eclipse-Helios_Shortcuts https://www.jetbrains.com/help/idea/migrating-from-eclipse-to-intellij-idea.html#Shortcuts

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

    Yes. you can't remember all the shortcuts. You will forget many of them for sure. In this way, you can recall it and get the work done quickly.

    Press Ctrl+3

    And type whatever the hell you want :) It's a shortcut for shortcuts

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

    For static import select the field and press Ctrl+Shift+M

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

    IntelliJ just inserts them automagically; no shortcut required. If the class name is ambiguous, it'll show me the list of possibilities to choose from. It reads my mind....

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

    Ctrl+Space : Show Imports

    This displays imports as you're typing a non-standard class name provided the proper references have been added to the project.

    This works on partial or complete class names as you are typing them or after the fact (Just place the cursor back on the class name with squigglies).

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