Some shortcuts commonly used in eclipse

[b]
Eclipse has the following shortcut keys related to editing.

   1. 【ALT+/】

   This shortcut key is a good helper for user editing, and can provide users with content assistance. Don’t worry about not remembering all the names of methods and properties. When you can’t remember all the names of classes, methods, and properties, try the [ALT+/] shortcut key with Come to the benefit.

   2. 【Ctrl+/】

   Quickly add comments, you can quickly add comments or uncomments for the line where the cursor is located or the selected line. You may always need to comment something or uncomment when debugging. Now, there is no need to repeat comments for each line.

   3. 【Ctrl+D】

   Delete the current line, which is also one of my favorites, without having to press the delete key so many times to delete a line.

4. 【Alt + ↓】 、 【Alt + ↑】

The interaction position of the current line and the next line, the interaction position of the current line and the line above (especially practical, you can save the first cut and then paste)

   5. 【Ctrl+M】

   The window is maximized and restored. When users operate in the window, they always feel that the current window is small (especially when writing code). Now, try the [Ctrl+M] shortcut key.

 

   View and locate shortcuts

   In the program, it is very difficult to quickly locate the location of the code and quickly find the location of the bug. Eclipse provides a powerful search function, and the following shortcut keys can be used to help complete the search and positioning work.

   1. 【Ctrl+Shift+T】

   Find Java class files that can be found in the Workspace build path, don't worry about not being able to find classes, and you can use wildcards like "*", "?", etc.

   2. 【Ctrl+Shift+R】

   Corresponding to [Ctrl+Shift+T], find all files (including Java files) in the workspace (Workspace), and wildcards can also be used.

   3. 【Ctrl+Shift+G】

   Find references to classes, methods, and properties. This is a very useful shortcut key. For example, if you want to modify the code that references a method, you can use the [Ctrl+Shift+G] shortcut key to quickly locate all the locations that reference this method.

4. 【Ctrl+O】

   Displays the outline of the methods and properties in the class, which can quickly locate the methods and properties of the class, which is very useful when finding bugs

   5. 【Ctrl+Shift+O】

Quickly generate import. After copying a program from the Internet, you don't know how to import the called class. Try the [Ctrl+Shift+O] shortcut key, there will be surprises.

   6. 【Ctrl+Shift+F】

   Formatting code, writing code with a format specification is a compulsory course for every programmer. When you see a certain piece of code that is extremely unpleasant, you can format this code by pressing the [Ctrl+Shift+F] shortcut key after selecting it. If the code is not selected, the current file (Java file) is formatted by default.

   7. 【ALT+Shift+W】

   Find the path in the project where the current file is located, you can quickly locate the location of the browser view, this shortcut is very useful if you want to find the package where a file is located (especially in relatively large projects).

   8. 【Ctrl+L】

   Navigate to a line in the current editor, also valid for non-Java files.

   9. 【Alt + ←】 、 【Alt + →】

   Backward history and forward history are very useful when tracking codes. Users may have searched for several related places, but may not remember them clearly. These two shortcut keys can be used to locate the search order.

   10. 【F3】

Quickly locate a class, method, and property at the cursor position.

   11. 【F4】

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


Added some more files below

 MyEclipse Shortcuts
(1) Ctrl+M to switch the size of the window
(2) Ctrl+Q jumps to the last edit place
(3) F2 When the mouse is placed on a mark and the Tooltip appears, press F2 to move the mouse away, and the Tooltip will also display Show Tooltip Description.
          F3 jumps to the place of declaration or definition.
          F5 single-step debugging into the function inside.
          F6 single-step debugging does not enter the function. If Kingsoft PowerWord 2006 is installed, the shortcut key of "word selection switch" should be changed to another.
          F7 returns to the caller from inside the function.
          F8 executes until the next breakpoint.
(4) Ctrl+Pg~ For XML files, it is to switch the code and icon windows
(5) Ctrl+Alt+I to see the relevant information of variables in the Java file
(6) Ctrl+PgUp opens the "Show List" drop-down box for the code window, in which the recently opened files are displayed
(7) Ctrl+/ is this kind of //~ comment in the code window.
          Ctrl+Shift+/ is this /*~*/ comment in the code window and <!--~--> in the JSP file window.
(8) Alt+Shift+O (or click the Toggle Mark Occurrences button in the toolbar) When a mark is clicked, the mark in other places on this page will be highlighted in yellow, and a white square will appear on the right border of the window. Clicking this box will jump to this marker.
(9) Right-click the left border of the window, that is, where the breakpoint is added, and select Show Line Numbers to add line numbers.
(10) Ctrl+I Format Active Elements.
            Ctrl+Shift+F Format Document.
(11) Ctrl+S saves the current file.
            Ctrl+Shift+S saves all unsaved files.
(12) Ctrl+Shift+M (first place the cursor on the class name of the package to be imported) The function is to add an Import statement.
            The effect of Ctrl+Shift+O is that the missing Import statement is added, and the redundant Import statement is deleted.
(13) Ctrl+Space prompts that the content to be typed is Content Assist. At this time, the shortcut key of Chinese(Simplified)IME-Ime/Nonlme Toggle in the input method (used to switch between English and other text) should be changed to something else, such as Ctrl +Shift+Z, at the same time delete other Chinese input methods under Chinese (PRC) in the "Text Service and Input Languages" dialog box and only keep the Ziguang input method. At this time, pressing Ctrl+Shift+Z will switch between English and Ziguang Chinese. switch between.
            Ctrl+Shift+Space prompts Context Information.
(14) Ctrl+D deletes the current line.
(15) Double-click the left border of the window to add a breakpoint.
(16) Right-click "Campare With" or "Replace With" in files such as .jap. or .java to find the history of all operations.
(17) Select Window-Show View-Navigator in the menu to call out the navigation function window.
(18) Ctrl+1 quick fix (the most classic shortcut, needless to say)

Ctrl+Alt+↓ Copy the current line to the next line (copy increase)
Ctrl+Alt+↑ Copy the current line to the previous line (copy increase)

Alt+↓ The interaction position between the current line and the next line (especially practical, you can save the first cut and then paste)
Alt+↑ the current line and the above line interactive position (same as above)
Alt+← Previous edited page
Alt+→ Next edited page (of course for the above one)

Alt+Enter Display the properties of the currently selected resource (project, or file or file)

Shift+Enter inserts a blank line in the next line of the current line (the mouse can be anywhere in the current line, not necessarily the last)
Shift+Ctrl+Enter inserts a blank line in the current line (the principle is the same as the previous one)

Ctrl+Q to navigate to the last edited place
Ctrl+L locates on a certain line (good news for those with more than 100 programs)
Ctrl+M maximizes the current Edit or View (and vice versa)
Ctrl+/ Comment the current line, press again to uncomment
Ctrl+O Quickly display OutLine
Ctrl+T Quickly display the inheritance structure of the current class
Ctrl+W closes the current Editor
Ctrl+K Refer to the selected Word to quickly navigate to the next one
Ctrl+E Quickly display the drop-down list of the current Editor (if the current page is not displayed in bold)

Ctrl+/(keyboard) Collapse all code in the current class
Ctrl+× (keyboard) Expand all code in the current class
Ctrl+Space The code assistant completes the insertion of some code (but generally it conflicts with the input method, you can modify the hotkey of the input method, or you can temporarily use Alt+/ instead)

Ctrl+Shift+E Displays the manager that manages all currently open Views (you can choose to close, activate, etc.)
Ctrl+J Forward incremental search (after pressing Ctrl+J, each letter editor you enter provides a quick match to locate a word, if not, it will be displayed in the stutes line that it is not found, check one It is especially useful when using words, Idea has this function two years ago)

Ctrl+Shift+J Reverse incremental search (same as the previous one, but search from back to front)

Ctrl+Shift+F4 closes all open editors

Ctrl+Shift+X Change all selected text to lowercase

Ctrl+Shift+Y Change the currently selected text to lowercase

Ctrl+Shift+F Format current code

Ctrl+Shift+P locates the matching character (such as {}) (when positioning from the front to the back, the cursor should be in the matching character, from the back to the front, and vice versa)

The following shortcut keys are commonly used in refactoring, and I like to sort out the ones I like and commonly use (Note: The shortcut keys for general refactoring all start with Alt+Shift)

Alt+Shift+R Rename (it's my favorite one, especially the Rename of variables and classes, which saves a lot of labor than manual methods)

Alt+Shift+M Extraction method (this is one of the most common methods in refactoring, especially useful for a lot of muddy code)

Alt+Shift+C Modify the function structure (more practical, there are N functions that call this method, modify it once)

Alt+Shift+L Extract local variables (you can directly extract some magic numbers and strings into a variable, especially when multiple calls)

Alt+Shift+F Change the local variable in the Class to the field variable (a more practical function)

Alt+Shift+I merge variables (may be a bit inappropriate to say Inline)

Alt+Shift+V Move functions and variables (not very common)

Alt+Shift+Z Refactoring regret medicine (Undo)

   Debug shortcuts

   Eclipse has the following shortcut keys related to running and debugging.

   1. [Ctrl+Shift+B]: Set a breakpoint or cancel the set breakpoint on the current line.

   2. 【F11】: Debug the last executed program.

   3. [Ctrl+F11]: run the last executed program.

   4. 【F5】: trace to the method, when the program executes to a method, you can press the【F5】key to trace to the method.

   5. 【F6】: Single-step program execution.

   6. [F7]: After executing the method, return to the next statement that calls this method.

   7. [F8]: Continue to execute to the next breakpoint or end of the program.
[/b]

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326631680&siteId=291194637