Eclipse commonly used development shortcuts

Time:2019-8-13

15 Eclipse Commonly Used Skills for Developing Shortcut Keys

1. alt+? Or alt+/: AutoComplete Code or Tip Code
2. Ctrl + o: Fast outline view
3. Ctrl + Shift + r: Open the resource list
4. Ctrl + Shift + f: formatting code
5. Ctrl + e: Quick Conversion Editor
6. Ctrl + page down or Ctrl + page up: Quick switching between tabs
7. Shift + enter and Ctrl + Shift + enter: Create blanks on or below the current line.
8. Alt + Directional Key Up and Down: Up and Down Exchange Content or Move Current Line Content Up or Down
9. Control + Alt + Directional Up and Down Key: Copy one or more lines highlighted
10. Ctrl + m: Maximizing the current edit page window
11. Ctrl +/: Automatically annotate current or selected multiple lines
12. Ctrl + shift +/: Automatically comment out selected code blocks
13. Ctrl + d: Delete the current line
14. Ctrl + Shift + X and Ctrl + Shift + y: case-to-case conversion of English letters
CTRL + Shift + o: automatically introducing packages and deleting useless packages

Attach some tips:

Lock the command line window:In the command line view (Window – > Show View – > Other – > Basic – > Console), try using the scroll lock button to lock the console output without scrolling.

Using Ant View:In my Java or Debug mode, I like to display an Ant view so that I can run Ant tasks quickly. The view can be found through Window Ant. Place the Ant view in the corner of the screen and add the build. XML file by adding the “Add – > Other – > Show View – > Build files” button. In version 3.1, Ant Debugging Scripting Language is even supported.

Automatically traverse a collection:For + Control-Space: If you don’t know yet, you should remember that Control-Space is an automatic completion function. In Eclipse, you can also automate the structure. In an array or collection range, try entering “for” and pressing the Control-Space key. Eclipse asks you which collection you want to traverse and then automatically complete the loop code.

Using hierarchical layout:The default layout (flat) in Package Explorer View confuses me by displaying the full name of the package in the navigation tree. I prefer the package and file system view of my source code, called Hierarchical Layout in Eclipse. To switch to this mode, click the down button in the package browsing view, select Layout, and then select Hierarchy.
Display multiple files at a time:You can browse multiple files at a time. Drag an edit window that is not in the active state onto the scroll bar at the bottom or side of the active window to open the edit window. This is the best way I can describe the trick.

Open two Eclipses at the same time:To merge changes from one CVS branch to another, I like to do this by opening two different Eclipses of the Workspace at the same time. So I can see all the changes by comparing the latest version of CVS (right-click on the project, then select Compare Lastest from HEAD) and merge each change into another CVS branch. The easiest way to start multiple Eclipses is to use Eclipse_with Launcher.

Implementors plug-in:Install a plug-in that jumps to an interface implementation. If you’re a dependency injection fan, or you’re working on a good interface, you need a plug-in to speed up code navigation. You can find this plug-in in Source Forge.

Automatically generate getter and setter methods:In the corresponding POJO, right-click on the blank, select Source, then select Generate Getters and Setters, and then choose which attributes to generate such a method, click OK, especially in the case of a large number of member variables, which saves time.

Attached is the Eclipse keyboard shortcut.

Ctrl + 1: Quick Repair
Ctrl + D: Delete the current line
Ctrl+Alt+: Copy the current line to the next line (replication increase)
Ctrl+Alt+: Copy the current line to the previous line (replication increase)
Alt+: Interactive position between the current line and the next line (especially practical, you can omit cutting and pasting first)
Alt+: Interaction position between the current row and the previous row (ibid.)
Alt+: The previous edited page
Alt+: The next edited page (for the one above, of course)
Alt+Enter: Displays the properties of the currently selected resource (project, or file or file)
Shift + Enter: Insert blank lines in the next row of the current line (when the mouse can be anywhere in the current line, not necessarily the last)
Shift + Ctrl + Enter: Insert blank lines in the current line (same principle as above)
Ctrl + Q: Locate the final edit
Ctrl + L: Locate in a line (for people with programs over 100, there’s a good news)
Ctrl + M: Maximize the current Edit or View (and then vice versa)
Ctrl+/: Comment on the current line, then cancel the comment as scheduled
Ctrl+O: Quick Display OutLine
Ctrl + T: Quickly display the inheritance structure of the current class
Ctrl + W: Turn off the current Editer
Ctrl + K: Refer to the selected Word to quickly locate the next
Ctrl + E: Quickly display the drop-down list of the current Editer (in bold if the current page is not displayed)
Ctrl+/(Keyboard): Folds all the code in the current class
Ctrl+* (Keyboard): Expand all the code in the current class
Ctrl + Space: Code assistant completes some code insertion (but usually conflicts with the input method, you can modify the hotkey of the input method, or you can temporarily replace it with Alt+/)
Ctrl + Shift + E: Display the manager that manages all Views currently open (you can choose to close, activate, etc.)
Ctrl + J: Forward incremental lookup (after pressing Ctrl + J, each letter editor you enter provides a quick match to locate a word, if not, it will show that it has not been found in stutes line. When looking up a word, it is particularly useful. Idea has this function two years ago).
Ctrl + Shift + J: Reverse incremental lookup (same as the previous one, but from the back to the front)
Ctrl + Shift + F4: Close all open Editers
Ctrl + Shift + X: Taste all currently selected text in lowercase
Ctrl + Shift + Y: Change all currently selected text to lowercase
Ctrl + Shift + F: Format the current code
Ctrl + Shift + P: Locate the matcher (e.g. {}) for the matcher (when positioning from front to back, the cursor should be inside the matcher, then back to front, and vice versa)
The following shortcuts are commonly used in refactoring. I will sort them out as I like and use them.
Alt + Shift + R: Renaming (one of my favorites, especially R ename for variables and classes, saves a lot of labor compared to manual methods)
Alt + Shift + M: Extraction method (which is one of the most commonly used methods in refactoring, especially for large piles of mud code)
Alt + Shift + C: Modify the function structure (more practical, N functions call this method, modify once to fix)
Alt + Shift + L: Extract local variables (you can directly extract magic numbers and strings into one variable, especially when multiple calls are made)
Alt+Shift+F: Change local variables in Class to field variables (more practical functions)
Alt + Shift + I: Merging variables (which may be a bit inappropriate to say Inline)
Alt+Shift+V: Moving Functions and Variables (Not Commonly Used)
Alt+Shift+Z: Undo