If you want to do good work, you must first sharpen your tools - Eclipse shortcut keys

If you want to do a good job, you must first use the tool ctrl

+shift + r to search the code file

ctrl+o object method

ctrl+e to open the code file to be opened

shift+enter and ctrl+shift+enter
Shift+enter is under the current line Creates a blank line, regardless of whether the cursor is at the end of the line. Ctrl+shift+enter inserts a blank line before the current line.

Alt+Arrow keys This shortcut works especially well
in the try/catch section.

ctrl+m Maximize the edit window

Alt-left arrow: In the navigation history

Press ctrl+t to list the interface's implementation class

Control-Q: Go back to the last edit place.

Control-Shift-F: CodeàJavaàPreferencesàReformat code according to code style settings. Our team has a unified code format and we put it on our wiki. To do this, we open Eclipse, select Window Style, and set Code Formatter, Code Style and Organize Imports. Use the Export function to generate configuration files. We put these configuration files on the wiki, and then everyone on the team imported them into their own Eclipse.

1. Ctrl+left key


This is often used by most people to view the definitions of variables, methods, and classes.

2. Ctrl+O to

view the outline of a class, listing its methods and member variables. Tip: Press Ctrl+O one more time to list the inherited methods and variables of this class.

Mnemonic: "O"--->"Outline"--->"Outline"

3. Ctrl+T

to view the inheritance relationship tree of a class, which is top-down, press Ctrl+T again, it will change into a bottom-up display structure.

Tip: Select a method name and press Ctrl+T to view the parent class, subclass, and interface with the method with the same name.

Mnemonic: "T"------->"Tree"----->"Hierarchy tree"

4.

Alt+Left and Right Arrow Keys We often encounter situations where Ctrl+Left key is used when looking at the code, traces layer by layer, and then gets lost in the code. At this time, just press "Alt+Left Arrow Key

" to return to the last reading position. To manage, pressing "Alt+Right Arrow" will advance to the reading position you just returned to, just like the browser's

forward and back buttons.

Import Package: Ctrl+Shift+O
Edit
Scope Function Shortcut
Global Find and Replace Ctrl+F
Text Editor Find Previous Ctrl+Shift+K
Text Editor Find Next Ctrl+K
Global Undo Ctrl+Z
Global Copy Ctrl+ C
Global restore previous selection Alt+Shift+↓
Global cut Ctrl+X
Global quick fix Ctrl1+1
Global content assist Alt+/
Global selection all Ctrl+A
Global delete Delete
global context information Alt+?
Alt+Shift+?
Ctrl+Shift+Space
Java editor shows tooltip description F2
Java editor selects encapsulated element Alt+Shift+↑
Java editor selects previous element Alt+Shift+←
Java editor selects next element Alt+Shift+→
text Editor Incremental Search Ctrl+J
Text Editor Incremental Reverse Search Ctrl+Shift+J
Global Paste Ctrl+V
Global Redo Ctrl+Y
View
Scope Function Shortcuts
Global Zoom Ctrl+=
Global Zoom Ctrl+ -Window Scope
Function Shortcuts
Key
Global Activate Editor F12
Global Toggle Editor Ctrl+Shift+W
Global Previous Editor Ctrl+Shift+F6
Global Previous View Ctrl+Shift+F7
Global Previous Perspective Ctrl+Shift+F8
Global Next Editor Ctrl +F6
Global Next View Ctrl+F7
Global Next Perspective Ctrl+F8
Text Editor Show Ruler Context Menu Ctrl+W
Global Show View Menu Ctrl+F10
Global Show System Menu Alt+-
Navigation
Scope Function Shortcuts
Java Editor Open Structure Ctrl+F3
Global Open Type Ctrl+Shift+T
Global Open Type Hierarchy F4
Global Open Declaration F3
Global Open External javadoc Shift+F2
Global Open Resource Ctrl+Shift+R
Global Back History Record Alt+←
Global Advance History Alt+ →
Global Previous Ctrl+,
Global Next Ctrl+.
Java Editor Show Outline Ctrl+O
Global Open in Hierarchy Type Ctrl+Shift+H
Global Go To Matching Bracket Ctrl+Shift+P
Global Go To Previous Edit Position Ctrl+Q
Java Editor Go To Previous Member Ctrl+Shift+↑
Java Editor Go To Next Member Ctrl+Shift+↓
Text Editor Go To Line Ctrl+L
Search
Scope Function Shortcuts
Global Appears In Ctrl+Shift+U in the file to
open the search dialog globally Ctrl+H
Declaration in the global workspace Ctrl+G
Reference in the global workspace Ctrl+Shift+G
Text editing
Scope function shortcut keys
Text editor rewrite switch Insert
Text editor scroll up Ctrl+↑
Text editor scroll down Ctrl+↓
File
Scope function shortcut keys
Global save Ctrl+X
Ctrl+S
Global print Ctrl+P
Global close Ctrl+F4
Global save all Ctrl +Shift+
SClose all global Ctrl+Shift+F4
Global properties Alt+Enter
global new Ctrl+N
project
Scope function shortcut keys
Global build Ctrl+B
source code
Scope function shortcut keys
Java editor formatting Ctrl+Shift+ F
Java editor uncomment Ctrl+/
Java editor comment Ctrl+/
Java editor add a single import Ctrl+Shift+M
Java editor organize multiple imports Ctrl+Shift+O
Java editor use try/catch blocks to surround unset, It is too commonly used, so it is listed here, and it is recommended to set it yourself.
It can also be corrected automatically using Ctrl+1.
Debug/Run
Scope function shortcut keys
Global single step return F7
Global Single Step Skip F6
Global Step Into F5
Global Step Into Select Ctrl+F5
Global Debug Last Started F11
Global Continue F8
Global Single Step With Filters Shift+F5
Global Add/Remove Breakpoints Ctrl+Shift+ B
Global display Ctrl+D
Global operation Last start Ctrl+F11
Global operation to line Ctrl+R
Global execution Ctrl+U
Refactoring
Scope function shortcut keys
Global undo refactoring Alt+Shift+Z
Global extraction method Alt+Shift+M
Global Extract Local Variables Alt+Shift+L
Global Inline Alt+Shift+I
Global Move Alt+Shift+V
Global Rename Alt+Shift+R
Global Redo Alt+Shift+Y

(1) Ctrl+M Switch the size of the window
(2) Ctrl+Q jumps to the last edit place
(3) F2 When the mouse is placed on a marker 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 the icon window
(5) Ctrl+Alt+I to see the relevant information of variables in the Java file
(6) Ctrl+PgUp is to open the "Show List" drop-down box for the code window , in this drop-down box, there are recently opened files
(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 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 keys of Chinese (Simplified) IME-Ime/Nonlme Toggle in the input method (used to switch between English and other texts) should be changed to other ones.
Ctrl+Shift+Space prompts Context Information.
(14) Double-click the left border of the window to add a breakpoint.
(15) Ctrl+D deletes the current line.

Eclipse shortcut keys
Ctrl+1 Quick fix (the most classic shortcut key, needless to say)
Ctrl+D: Delete the current line
Ctrl+Alt+↓ Copy the current line to the next line (copy increase)
Ctrl+Alt+↑ Copy the current line Go to the previous line (copy and add)

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

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

Shift+Enter Insert a blank line in the next line of the current line (this time 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 locates 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 (press again and vice versa)
Ctrl+/ Comments the current line, presses again to uncomment
Ctrl+O Quick Display OutLine
Ctrl+T Quickly display the inheritance structure of the current class
Ctrl+W Close the current Editor
Ctrl+K Refer to the selected Word to quickly navigate to the next
Ctrl+E Quickly display the drop-down list of the current Editor (if the current page is not displayed, it is shown in bold )

Ctrl+/(Keyboard) Collapse all codes in the current class

Ctrl+×(Keyboard) Expand all codes in the current class

Ctrl+Space Code assistant completes some code insertion (but generally conflict with the input method, you can modify the input method You can also temporarily use

Alt+/ instead)

Ctrl+Shift+E Display the manager that manages all currently opened Views (can choose to close, activate, etc.)

Ctrl+J Forward incremental search (press Ctrl After +J, each letter editor you enter provides quick matching to locate a word. If not

, it will show that it is not found in the stutes line. It is especially useful when looking up a word. This function Idea two years ago Ctrl+Shift+J Reverse incremental search (same as the previous one

, but from back to front)

Ctrl+Shift+F4 Close all open editors

Ctrl+Shift+X Remove all the currently selected text Smell lowercase

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

Ctrl+Shift+F Format the current code

Ctrl+Shift+P Position to the matching character (such as {}) (when positioning from the front to the back, the cursor should be in the matching 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+R Rename (it is my favorite one, especially the Rename of variables and classes, which can save a lot of labor than manual methods)

Alt+Shift+M Extract method (this is the most commonly used method in refactoring One of them, especially useful for a lot of mud 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 into a field variable (a more practical function)

Alt+Shift+I Combine variables ( It may be a bit inappropriate to say that Inline)
Alt+Shift+V Move functions and variables (not very common)
Alt+Shift+Z Refactoring regret medicine (Undo)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326400938&siteId=291194637