Java and Android: shortcut keys in eclipse (Classic favorites)

Source: Internet
Author: User

1. Select the area you want to add comments to, and press ctrl + shift + C to add // comments.
2. Select the device you want to comment on, and use shit + ctrl +/to add/**/comment.
3. To correct the shortcut key style of the number order in eclispe, you only need to go to windows> preference> General> key settings)
Add: select the area to be annotated, ctrl +/Add // comment 2010/09/13
After the project is selected, press ctrl + shift + \ to remove the comments of the selected project group.

Appendix: List of all shortcut keys in myeclipse:
Ctrl + 1 quick fix (the most classic shortcut key is enough)
Ctrl + D: Delete the current row
Ctrl + Alt + ↓ copy the current row to the next row (copy grows)
Ctrl + Alt + ↓ copy the current row to the previous row (copy grows)
Alt + ↑ the interaction status between the current row and the following row (Xihan is practical, you can save cutting and pasting)
Alt + ↑ interaction between the current row and the top row (same as above)
Alt + ↓ previous edited page
Alt + → next Edit page (for the top one, of course)
Alt + Enter display the properties of the currently selected data (project, or file)
Shift + Enter insert blank lines in the next row of the current row (the mouse can be in any position of the current row, not necessarily the end)
Shift + Ctrl + Enter insert blank lines in the current row (same as above)
Ctrl + Q locate the Last edited location
Ctrl + L positioning in a certain line (for those with a law that spans 100, there will be good news)
Ctrl + M maximize the current Edit or View (then press it, and vice versa)
Ctrl +/comment on the current row, and then press it to invalidate the comment
Ctrl + O quick OutLine display
Ctrl + T to quickly display the continuous layout of the current class
Ctrl + W close the current Editer
Ctrl + K quickly locate to the next one by referencing the selected Word
Ctrl + E: Quickly display the drop-down list of the current Editer (if the current page is not displayed, use a simhei prompt)
Ctrl +/(keypad) collapse all code in the current class
Ctrl + × (keypad) show all the code in the current class
Ctrl + Space Code assistant inserts some code (but it usually conflicts with the input method. You can correct the Input key, or use Alt +/for replacement)
Ctrl + Shift + E display the administrator of all views currently opened (you can choose to disable, activate, and perform other operations)
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 is not found in stutes line. It is practical to query a word. This feature was available two years ago)
Ctrl + Shift + J reverse incremental search (similar to the previous one, but from the back to the front)
Ctrl + Shift + F4 close all open Editer
Ctrl + Shift + X change all selected text to lowercase
Ctrl + Shift + Y change all selected text to lowercase
Ctrl + Shift + F current Code
Ctrl + Shift + P locate the matched character (for example, {}) (when the domain is located before it, the cursor must be inside the match character, followed by the front, and vice versa)

The following shortcut keys are commonly used in refactoring. I prefer and usually clean them up (Note: Generally, the refactoring shortcut keys are Alt + Shift)
Alt + Shift + R Rename (one of my favorite ones, especially the Rename of variables and classes, which is much more labor-saving than manual methods)
Alt + Shift + M extraction method (this is one of the most common methods in refactoring, especially for a lot of mud code)
Alt + Shift + C correct the function layout (strong and practical, N functions have called this method, correct it once)
Alt + Shift + L extract local variables (you can directly extract some magic numbers and strings into one variable, especially when multiple calls are made)
Alt + Shift + F convert the local variable in the Class into the field variable (a practical function)
Alt + Shift + I merge variables (it may be a bit inappropriate Inline)
Alt + Shift + V moving functions and variables (not commonly used)
Alt + Shift + Z restructured regret medicine (Undo)

Edit
Shortcut for role Domain Function
Search globally and change Ctrl + F
Search for the previous Ctrl + Shift + K in the text editor
Search for the Next Ctrl + K in the text editor
Globally undo Ctrl + Z
Global copy Ctrl + C
Select Alt + Shift + continue for global recovery.
Globally cut Ctrl + X
Global quick correction of Ctrl1 + 1
Global content help Alt +/
Globally select Ctrl +
Delete globally
Alt +?
Alt + Shift +?
Ctrl + Shift + Space
Java editor displays the object prompt description F2
Java editor selects the encapsulation element Alt + Shift + Transform
Java editor selects the previous element Alt + Shift + ↓
Select the next element Alt + Shift + →
Text Editor incremental search Ctrl + J
Text Editor incremental reverse lookup Ctrl + Shift + J
Globally paste Ctrl + V
Global redo Ctrl + Y

View
Shortcut for role Domain Function
Zoom in globally Ctrl + =
Ctrl +-

Window
Shortcut for role Domain Function
Global activation editor F12
Global switch editor Ctrl + Shift + W
Global editor Ctrl + Shift + F6
Global View Ctrl + Shift + F7
Global Perspective Ctrl + Shift + F8
The next global editor Ctrl + F6
Next Global View Ctrl + F7
Ctrl + F8
Text Editor: Ctrl + W
Global View menu Ctrl + F10
Global Display System Menu Alt +-

Navigation
Shortcut for role Domain Function
Open the layout in the Java editor Ctrl + F3
Global Open type Ctrl + Shift + T
Global Open Type hierarchical layout F4
Global open declaration F3
Open external javadoc Shift + F2 globally
Globally open materials Ctrl + Shift + R
Global withdrawal, history reduction, Alt + ↓
Global progress history records Alt + →
Ctrl +,
Ctrl +.
Java editor display program Ctrl + O
Globally open type Ctrl + Shift + H in hierarchical Layout
Globally move to matching parentheses Ctrl + Shift + P
Go global to the previous editing position Ctrl + Q
Go to the previous Member Ctrl + Shift + ← in the Java editor.
Go to the next member in the Java editor Ctrl + Shift + ←
Text Editor to Ctrl + L

Search
Shortcut for role Domain Function
Ctrl + Shift + U
Global Open Search dialog box Ctrl + H
Declare Ctrl + G in the global Workspace
Reference Ctrl + Shift + G in the global Workspace

Text editing
Shortcut for role Domain Function
Text Editor rewrite switch Insert
Ctrl + ← on the text editor
Ctrl + ←

File
Shortcut for role Domain Function
Save Ctrl + X globally
Ctrl + S
Print Ctrl + P globally
Globally closed Ctrl + F4
Globally save Ctrl + Shift + S
Globally closed Ctrl + Shift + F4
Global attribute Alt + Enter
Globally create Ctrl + N

Project
Shortcut for role Domain Function
Global build Ctrl + B

Source code
Shortcut for role Domain Function
Java editor pattern Ctrl + Shift + F
Java editor void comment Ctrl + Java editor comment Ctrl +/
Add and import Ctrl + Shift + M to the Java Editor
Java editor organization import Ctrl + Shift + O
The try/catch Block is not set in the Java editor. It is too common. Therefore, we recommend that you set it here.
You can also apply Ctrl + 1 to make corrections.

Run
Shortcut for role Domain Function
F7 is returned in one global step.
Skip F6 in one global step
Global One-Step Jump to F5
Global One-Step Jump-in and select Ctrl + F5
Start F11 before global debugging
Global continuous F8
Global Application filter performs Shift + F5 in one step
Globally Add/remove breakpoints Ctrl + Shift + B
Global display Ctrl + D
Start Ctrl + F11 before global running
Run Ctrl + R globally
Perform Ctrl + U globally

Reconstruction
Shortcut for role Domain Function
Global undo reconstruction Alt + Shift + Z
Global extraction method Alt + Shift + M
Global extraction of local variables Alt + Shift + L
Global inline Alt + Shift + I
Move Alt + Shift + V globally
Global rename: Alt + Shift + R
Global redo Alt + Shift + Y

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.