Common shortcut keys Eclipse

Source: Internet
Author: User
Tags switches try catch

Common shortcut keys

Eclipse's editing capabilities are powerful, and mastering the Eclipse shortcut key capabilities can greatly improve development efficiency. There are several shortcut keys related to editing in Eclipse.

    1. "alt+/"

      This shortcut is a good helper for the user to edit, can provide users with the content of the assistant, do not worry about the method and the name of the property, when the name of the class, method and attribute, more experience the benefits of "alt+/" shortcut key.

    2. Ctrl+o

      shows an outline of the methods and properties in a class that quickly locates the methods and properties of a class and is useful for finding bugs.

    3. "ctrl+/"

      Quickly add comments, can quickly add comments or uncomment the line of the cursor or the selected line, when debugging may always need to comment on some things or uncomment, now well, do not need to repeat each line of comments.

    4. "ctrl+d"

      Deletes the current line, which is one of my favorites, not to delete a row and press so many deletions.

    5. "ctrl+m"

      window to maximize and restore, when the user in the window, always feel that the current window is small (especially when writing code), now good, try "ctrl+m" shortcut keys.

      View and locate shortcut keys

      In the program, quickly locate the location of the code, quickly find where the bug is a very difficult thing, Eclipse provides a powerful search function, you can use the following shortcut keys to help complete the job of locating.

    6. "Ctrl+k", "ctrl++shift+k"

      Quickly look down and up the selection, and you no longer need to click the Find dialog box with your mouse. The Java class file can be found in the

    7. "ctrl+shift+t"

      Find Workspace (Workspace) build path, not to find the class, and you can use "*", "? "And so on wildcard characters.

    8. "Ctrl+shift+r"

      and "ctrl+shift+t" correspond to find all files (including Java files) in the workspace (Workspace), or you can use wildcard characters.

    9. "Ctrl+shift+g"

      Finds references to classes, methods, and properties. This is a very useful shortcut key, such as to modify the code that refers to a method, you can quickly locate all references to this method by using the "ctrl+shift+g" shortcut key.

    10. "Ctrl+shift+o"

Quickly generate import, when copying a program from the Internet, do not know how to import into the called class, try "ctrl+shift+o" shortcut keys, there will be surprises.

    1. "Ctrl+shift+f"

      Format code, write the code of the format specification is a compulsory lesson for every programmer, when see a piece of code is very uncomfortable, select and press "ctrl+shift+f" shortcut key can format this code, if the code is not selected the default format of the current file (Java file).

    2. "Alt+shift+w"

      Find the path in the project where the current file is located, and you can quickly locate the location of the browser view, which is useful if you want to find a package that contains a file (especially in larger projects).

    3. "Ctrl+l"

      Navigates to a row in the current editor and is also valid for non-Java files.

    4. "alt+←", "alt+→"

      Backward history and forward history are useful in tracking code, and users may find several associated places, but they may not be able to remember the order in which they are located by these two shortcut keys.

    5. "F3"

A class, method, and property that quickly locates the cursor position.

  1. "F4"

    Displays the inheritance relationship for the class and opens the Class inheritance view.

    debugging shortcut keys

    There are several shortcut keys in eclipse that are related to running debugging.

  2. "Ctrl+shift+b": Sets a breakpoint on the current line or cancels the setting.

  3. "F11": debugs the last executed program.

  4. "Ctrl+f11": Runs the program that was last executed.

  5. "F5": In the trace to method, when the program executes to a method, you can press "F5" key to trace to the method.

  6. "F6": Stepping through the program.

  7. "F7": Executes the method, returning to the next statement that called this method.

  8. "F8": Continue execution to the next breakpoint or end of the program.

    Common editor shortcut keys

    Usually the text editor provides some shortcut keys related to editing, which you can also use to edit text in eclipse.

  9. "Ctrl + C": Copy.

  10. "Ctrl+x": Cut.

  11. "Ctrl + V": Paste.

  12. "Ctrl+s": Save the file.

  13. "Ctrl + Z": Undo.

  14. "Ctrl+y": Repeat.

  15. "Ctrl+f": Find.

    Other shortcut keys

    There are many shortcuts in eclipse that cannot be enumerated, and users can find out how to use them through the Help document, as well as several common shortcut keys.

  16. "CTRL+F6": Switch to the next editor.

  17. "CTRL+SHIFT+F6": Switches to the previous editor.

  18. "CTRL+F7": Switches to the next view.

  19. "CTRL+SHIFT+F7": Switches to the previous view.

  20. "Ctrl+f8": Switches to the next perspective.

  21. "Ctrl+shift+f8": Switches to the previous perspective.

    There are many shortcuts in eclipse, which can be used to find all the shortcuts through the Help document, but it is not possible to master all the shortcuts, and it is not necessary to take the time to familiarize yourself with the shortcut keys listed in this section.

    1. Edit->content Assist-> Add alt+/Code Association

    2. window, Next Editor, add ctrl+tab switch windows

    3. Run/debug Toggle Line breakpoint, add Ctrl + ' delete breakpoints when debugging

    4. Source-> Surround with Try/catch Block--ctrl+shift+v add try Catch box

    5. Source-Generate Getters and Setters-ctrl+shift+. Add a Get Set method

——— – Useful shortcut keys ——— –

alt+/Code Helper to complete the insertion of some code (but the general and IME conflict, you can modify the input method hotkey, you can also take up alt+/to replace)

CTRL+1: The cursor stops at a variable, and pressing the CTRL+1 key can provide a quick refactoring scheme. Select several rows and press Ctrl+1 to place the code in a block of code such as, while, if, do, or try.

Double-click the opening parenthesis (parentheses, brackets, curly braces) to select everything in parentheses.

Alt+enter displays the properties of the currently selected resource (project, or file or file)

——— –ctrl Series ——— –

Ctrl+k: Hover the cursor over the variable and press Ctrl+k to find the next same variable

Ctrl+shift+k: Opposite to Ctrl+k Lookup

Ctrl+e quick display of the current Editer drop-down list (in bold if the current page does not appear)

Ctrl+shift+e Display manager that manages all of the currently open view (you can choose to close, activate, and so on)

Ctrl+q positioning to the last edited place

Ctrl+l positioning in a row (for people with programs over 100 have the gospel)

Ctrl+m maximize the current edit or view (and vice versa)

ctrl+/comment on the current line, and then uncomment it

Ctrl+t quickly displays the inheritance structure of the current class

CTRL+SHIFT-T: Opens type (open type). If you don't intentionally skiving, forget to open it through the source tree.

Ctrl+o: Open a small window like outline view in your code

CTRL + Mouse hover: can display the source code of classes and methods

Ctrl+h: Open the Search window

ctrl+/(numpad) collapses all code in the current class

Ctrl+x (keypad) expands all code in the current class

——— –ctrl+shift Series ——— –

Ctrl+shift+f formatting of the current code

Ctrl+shift+x the text that is currently selected is all stale lowercase

Ctrl+shift+y turns the currently selected text to lowercase

Ctrl+shift+o: Importing import quickly

Ctrl+shift+r: Opening resource Open Resource

ctrl+shift+/Plus paragraph annotation/**/

Ctrl+shift+\ Canceling segment Comments/**/

SHIFT+ALT+JT writing a document annotation to a method

——— –f shortcut key series ——— –

F3: Open the file that declares the reference

F4: Open type hierarchy

F5: Single-step jumping in

F6: one-step skip

F7: Step Outside

F8: Continue, if there are no breakpoints behind, the program will run out

——— – ——— for line editing –

Ctrl+d: Delete When moving forward

Ctrl+alt+↓ Copy the current row to the next row (replication incremented)

Ctrl+alt+↑ Copy the current line to the previous row (replication incremented)

Alt+↓ the current line and the next line of interaction (especially useful, can be omitted first cut, then pasted)

Alt+↑ the current line and the upper row interaction position (IBID.)

Shift+enter inserts a blank row on the next line of the current row (at which point the mouse can be at any position in the current row, not necessarily the last)

Ctrl+shift+enter Insert blank line in current line (principle above)

——— – Infrequently used ——— –

alt+← the previous edited page

alt+→ next Edit page (of course, for the above article)

Ctrl+shift+s: Save All

Ctrl+w Closing the current editer

Ctrl+shift+f4 Close all open editer

CTRL+SHIFT+G: Searching for references in workspace

Ctrl+shift+p position to the match (for example {}) (after locating from the front, the cursor is in the match, back to front, or vice versa)

——— – Do not understand ——— –

Ctrl+j forward Incremental lookup (after pressing CTRL+J, each letter editor you enter provides a quick match to navigate to a word, if not, it is not found in the Stutes line, check a word, especially useful, this function idea two years ago)

CTRL+SHIFT+J Reverse incremental lookup (same as above, except forward)

Common shortcut keys Eclipse

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.