This shortcut key is a good helper for users to edit and can provide content assistance for users. Don't worry about remembering the names of all methods and properties. When you can't remember the names of all classes, methods and properties, experience the benefits of ALT+/ shortcut keys.
2.Ctrl+O
Displaying the outline of methods and properties in a class can quickly locate the methods and properties of a class, which is very useful for finding bugs.
3.Ctrl+/
Quickly add comments. You can quickly add comments or uncomment the line where the cursor is located or the selected line. When debugging, you may always need to comment something or uncomment it. Now, you don't need to repeat the comment for each line.
4.Ctrl+D
Delete the current line, which is also one of my favorites. You don't have to press the delete key so many times to delete a row.
5.Ctrl+M
Maximize and restore windows. Users always feel that the current window is very small when operating the window (especially when writing code). Now, try the Ctrl+M shortcut.
View and locate shortcut keys
In a program, it is not easy to quickly locate code and find bugs. Eclipse provides a powerful search function. You can use the following shortcut keys to help complete the search and location.
1.Ctrl+K、Ctrl++Shift+K
Quickly search up and down the selection, no longer need to click the search dialog box with the mouse.
2.Ctrl+Shift+T
Find the discoverable Java class file in the workspace construction path. Don't worry about not finding a class, you can use "*" and "?" Equal sign wildcard.
3.Ctrl+Shift+R
For Ctrl+Shift+T, find all files (including Java files) in the workspace, or use wildcards.
4.Ctrl+Shift+G
Find references to classes, methods, and properties. This is a very practical shortcut key. For example, if you want to modify the code that references a method, you can use the shortcut key Ctrl+Shift+G to quickly locate all the locations that reference the method.
5.Ctrl+Shift+O
Quickly generate imports. Copying a program from the Internet, I don't know how to import it into the called class. Try Ctrl+Shift+O shortcut keys, and you will be surprised.
6.Ctrl+Shift+F
Formatting code and writing code in standard format is a compulsory course for every programmer. When you see an extremely unpleasant code, select it and press Ctrl+Shift+F to format it. If no code is selected, the current file (Java file) will be formatted by default.
7.ALT+Shift+W
Finding the path of the current file in the project can quickly locate the position of the browser view. This shortcut key is very useful if you want to find the package where the file is located (especially in a larger project).
8.Ctrl+L
Navigating to a line in the current editor is also valid for non-Java files.
9.Alt+←、Alt+→
Backward history and forward history are very useful when tracking code. Users may find several related places, but they may not remember them clearly. You can locate the search order through these two shortcut keys.
10. The third offspring
Classes, methods, and properties that can quickly locate the cursor position.
1 1. tetralogy of Fallot
Displays the inheritance relationship of the class and opens the class inheritance view.
Debugging shortcut keys
There are some shortcut keys related to running and debugging in Eclipse.
1.Ctrl+Shift+B: set or unset a breakpoint in the current line.
2.F 1 1: debug the last executed program.
3.Ctrl+F 1 1: Run the last executed program.
4.F5: A method was traced. When the program executes a method, you can press F5 to trace the method.
5.F6: Go through the procedure.
6.F7: After executing this method, return to the last statement calling this method.
7.F8: Continue execution until the next breakpoint or the program ends.
Other shortcut keys
There are many shortcut keys in Eclipse, which cannot be listed one by one. Users can learn how to use them through the help document. Here are some commonly used shortcut keys.
1.Ctrl+F6: Switch to the next editor.
2.Ctrl+Shift+F6: Switch to the previous editor.
3.Ctrl+F7: Switch to the next view.
4.Ctrl+Shift+F7: Switch to the previous view.
5.Ctrl+F8: Switch to the next perspective.
6.Ctrl+Shift+F8: Switch to the previous perspective.
There are many shortcut keys in Eclipse. You can find the usage of all shortcut keys through the help document, but it is impossible and unnecessary to master the usage of all shortcut keys. If you take some time to familiarize yourself with the shortcut keys listed in this section, you will get twice the result with half the effort.
7.[ctrl+shift+L] displays all shortcut keys.
1. Edit-> Content assistance->; Add Alt+/ code association
2. the window->; Next editor-> Add Ctrl+Tab to switch windows.
3. Run/debug switch line breakpoint->; Add Ctrl+ ` Add or delete breakpoints during debugging.
4. Source-> Enclose with try/catch blocks->; Ctrl+Shift+v adds a try catch box.
5. Source-> Generate Getters and setter-& gt;; Ctrl+Shift+。 Add the get set method.
Ctrl+ 1: Stop the cursor on a variable and press Ctrl+ 1 to provide a quick reconstruction scheme. Select a few lines and press Ctrl+ 1 to put this code into a code block, such as for, while, if, do or try.
Double-click the left parenthesis (parentheses, brackets, braces), and everything in the parenthesis will be selected.
Alt+Enter displays the properties of the currently selected resource (project, file or file).
-Ctrl series.
Ctrl+K: Place the cursor on the variable and press Ctrl+K to find the next same variable.
Ctrl+Shift+K: the search direction is opposite to ctrl+k.
Ctrl+E quickly displays the drop-down list of the current editor (in bold if the current page is not displayed).
Ctrl+Shift+E displays the manager that manages all currently open views (you can choose to close and activate them).
Ctrl+Q navigates to the last edited location.
Ctrl+Shift-T: open. If you don't dawdle on purpose, forget the way to open it through the source tree.
Ctrl+ mouse pause: you can display the source code of classes and methods.
Ctrl+H: open the search window
Ctrl+/ (keyboard) collapses all code in the current class.
Ctrl+× (keyboard) expands all codes in the current class.
-Ctrl+Shift series.
Ctrl+Shift+X turns all currently selected text into lowercase.
Ctrl+Shift+Y turns all currently selected text into lowercase.
Ctrl+Shift+R: open the resource.
Shift+Enter inserts an empty line next to the current line (at this time, the mouse can be anywhere in the current line, not necessarily at the end).
Ctrl+Shift+Enter inserts an empty line in the current line (the principle is the same as above).
Ctrl+W closes the current editor.
Ctrl+Shift+F4 closes all open editors.
Ctrl+Shift+G: search for references in the workspace.
Ctrl+Shift+P positions the right match (such as {}) (when positioning the back from the front, the cursor should be inside the match, and the back should be in front, and vice versa).
Note: This is a file that I downloaded online, and the ownership is not mine.