Eclipse shortcut keys include finding classes, methods, and variables

                                                                                               Reprinted from: https://blog.csdn.net/chushoutaizhong/article/details/51997929

【  Ctrl+T】 Search    for

the implementation class of the current interface When choosing the names of classes, methods, and properties, experience the benefits of the [ALT +/] shortcut key. 2. [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. 3. [Ctrl+/]     Quickly add comments, which can quickly add or uncomment the line where the cursor is located or the selected line. You may always need to comment something or uncomment when debugging. Now, you don’t need every line. Make repeated annotations. 4. [Ctrl+D]     deletes the current line, which is also one of my favorites. You don't need to press the delete key so many times to delete a line. 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. [Ct rl+K], [Ct rl++Shift +K] 
   to quickly search down and up the selected content, no longer need to click the search dialog box with the mouse.


   2. [Ct rl+Shift+T ] 
   Find the Java class files in the Workspace build path, don't worry about not being able to find the class, and you can use wildcards such as "*" and "?".


   3. [Ct rl+Shift +R] Find files  
   [Ct rl+Shift +T] Find classes, find all files (including Java files) in the workspace (Workspace), or use wildcards.


   4. [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 quickly locate all the locations that reference this method through the [Ctrl+Shift+G] shortcut key.


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


   6. [Ctrl+Shift+F] 
   Formatting code, writing the code with the format specification is a compulsory course for every programmer. When you see a certain piece of code that is extremely unpleasant, press [Ctrl+Shift +F] after selecting it. The shortcut key can format this code. If the code is not selected, the current file (Java file) will be 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, if you want to find the package where a file is located, this shortcut key is very useful (especially in relatively large projects. middle).


   8. [Ct rl+L] 
   locates a line in the current editor, which is also valid for non-Java files.


   9. [Alt +←], [Alt +→] 
   back history and forward history are very useful when tracking codes. Users may have found several related places, but they may not remember them clearly. A shortcut key locates the search order.


   10. [F3] 
Quickly locate a class, method and property at the cursor position.


   11. [F4] 
   Display the class inheritance relationship and open the class inheritance view.

Debugging shortcut keys
   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.

Common editor shortcuts
   Usually text editors provide some shortcut keys related to editing, and you can also use these shortcut keys to edit text in Eclipse. 
   1. [Ctrl+C]: Copy. 
   2. [Ctrl+X]: Cut. 
   3. [Ctrl+V]: Paste. 
   4. [Ctrl+S]: Save the file. 
   5. [Ctrl+Z]: Cancel. 
   6. [Ctrl+Y]: Repeat. 
   7. [Ctrl+F]: Search.

Other shortcut keys
   There are many shortcut keys in Eclipse, which cannot be listed one by one. You can find their use methods through the help documentation. In addition, there are several commonly used shortcut keys as follows. 
   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.

Line Comment/Pin Comment Ct rl+/ 
Block Comment/Pin Comment Ct rl+Sh ift +/ Ct rl+Sh ift +\
Find Find Replace Ct rl+H Ct rl+F
Find Related Information ct rl + shift + t by class name to find the corresponding class, included in which package, and hints.
Find Next/Go Back Ct rl+K Ct rl+Sh ift +K
Jump to a certain line Ct rl+L, I am used to Edit plus, I will type Ct rl+G from time to time to
find the declaration of the current element Ct rl +G or Ct rl plus the left mouse button to
find all references to the current element Ct rl+Sh ift +G
Reorganize Import Ct rl+Sh ift +O , can help you remove all unused Import declarations at once!
Return to the last check point Ct rl+Q It is very useful to
copy a code when looking at the source code Ct rl+Alt + down to
quickly fix Ct rl+1
to introduce a certain class (interface) ct rl + sh ift + m
add a header comment sh ift+alt+j
 
ct rl+sh ift+g: view reference  
ct rl+sh ift+n: rename  
ct rl+sh ift+o: import class  
ct rl+sh ift+r: start last run  
ct rl+ sh ift + f: format code  
ct rl + c: copy  
ct rl + v: paste  
ct rl + x: cut  
ct rl + a: select all  
ct rl + f: find  
ct rl + z: undo  
ct rl + y : redo  
ct rl + s: save  
-------------------------------------------- -------------------  
 
The most used ones should be CTRL+SH IFT+S  
and formatting.  
-------------------------------------------------- -------------  
 
ct rl + sh ift + f format code  
ct rl + sh ift + o organize import  
F3 open declaration  
Alt + sh ift + r rename variable  
 
------ -------------------------------------------------- -------  
 
up  
-------------------------------------------- ---------------------  
 
Alt +/        
 
-------------------------- -------------------------------------  
 
alt + left  
alt + right t  
ct rl + q  
-- -------------------------------------------------- -------------  
 
ct rl + sh ift + g: view reference  
ct rl + sh ift + n: rename  
ct rl + sh ift + f: format code  
ct rl + c: copy  
ct rl + v: paste  
ct rl + a: select all  
ct rl + f: find  
ct rl + z: undo  
ct rl + s: save  
Alt + / intellisense  
----------------------- ------------------------------------  
 
ct rl + sh ift + g: view reference  
ct rl + sh ift+n: rename  
ct rl+sh ift+o: import class  
ct rl+sh ift+r: start last run  
ct rl+sh ift+f: format code  
ct rl+c: copy  
ct rl+v: paste  
ct rl+x: cut  
ct rl+a: select all  
ct rl+f: find  
ct rl+z: undo  
ct rl+y: redo  
ct rl+s: save  
Alt + / Smart prompt  
F3 Open declaration  
Alt + sh ift + r The most commonly used variables to rename  
are the following:  
 
ct rl + sh ift + o: import class  
 
ct rl + sh ift + f: format code  
ct rl + c: copy  
ct rl + v: paste  
ct rl + x: cut  
ct rl + z: undo  
ct rl + s: save  
Alt + / intellisense  
 
----------------- --------------------------------------------------------  
 
Ct rl+M : Workspace maximize/minimize  
Alt +/: Intellisense  
F3: View statement  
Crt l+1: Fix bug  
 
Shift +Alt +T : Refactor  
Shift +Alt +M: Extract function  
Shift +Alt +R: Rename  
Shift +Alt +C: Change function tag  
 
Ct rl+Sh it f+F: Format code  
 
-------------------------- -------------------------------------  
 
ct rl + sh ift + o: import class  
at l + /: prompt  
ct rl + sh ift + t: find related information  
------------- ----------------------------------------  
 
Eclipse Shortcuts Guide                                                                          
Editing  
Scope Function Shortcut  
Global Find and Replace Ct rl+F  
Text Editor Find Previous Ct rl+Sh ift +K  
Text Editor Find Next Ct rl+K  
Global Undo Ct rl+Z  
Global Copy Ct rl+C  
Global Restore Previous Selection Alt + Shift +↓  
Global Cut Ct rl+  
XGlobal Quick Fix Ct rl1+1Global  
Content Assist Alt +/  
Global Select All Ctrl+  
AGlobal Delete Delete  
Global Context Info Alt +?  
Alt +Sh ift +?  
Ct rl+Sh ift +Space  
Java Editor Show tooltip description F2  
Java Editor Select wrapper element Alt +Sh ift +↑  
Java Editor Select previous element Alt +Sh ift +←  
Java Editor select Next Element Alt +Sh ift +→  
Text Editor Incremental Lookup Ct rl+J  
Text Editor Incremental Reverse Lookup Ct rl+Sh ift +J  
Global Paste Ct rl+V  
Global Redo Ct rl+Y  
   
View  
Scope Function Shortcut  
global zoom in Ct rl+=  
global zoom out Ct rl+-  
   
Window  
Scope Function Shortcut  
Global Activate Editor F12  
Global Toggle Editor Ct rl+Sh ift +W  
Global Previous Editor Ct rl+Sh ift +F6  
Global Previous View Ct rl+Sh ift +F7  
Global Previous Perspective Ct rl+Sh ift+F8  
Global Next Editor Ct rl+F6  
Global Next View Ct rl+F7  
Global Next Perspective Ct rl+F8  
Text Editor Show Ruler Context Menu Ct rl+W  
Global Show View Menu Ct rl +F10  
global Show system menu Alt +-  
   
Navigation  
scope Function Shortcut  
Java editor Open structure Ct rl+F3  
Global Open Type Ct rl+Sh ift +T  
Global Open Type Hierarchy F4  
Global Open Declaration F3  
Global Open External javadoc Shift +F2  
Global Open Resource Ct rl+Sh ift +R  
Global Back History Alt +←  
Global Forward History Alt +→  
global previous Ct rl+,  
global next Ct rl+.  
Java editor show outline Ct rl+O  
global open type in hierarchy Ct rl+Sh ift +H  
global go to matching bracket Ct rl+Sh ift +P  
Globally go to previous edit position Ct rl+Q  
Java editor Go to previous member Ct rl+Sh ift +↑  
Java Editor Go to Next Member Ct rl+Sh ift +↓  
Text Editor Go to Line Ct rl+L  
   
Search  
Scope Function Shortcut  
Global Appears in File Ct rl+Sh ift +U  
Global Open Search Dialog Ct rl +H  
global declaration in workspace Ct rl+G  
global reference in workspace Ct rl+Sh ift +G  
   
text editing  
scope function shortcut  
text editor rewrite switch Insert  
text editor scroll up Ct rl+↑  
text editor Scroll down line Ct rl+↓  
   
File  
scope Function Shortcut key  
Global Save Ct rl+X    
Ct rl+S  
Global Print Ct rl+P  
Global Close Ct rl+F4  
Global Save All Ct rl+Sh ift +S  
Global Close All Ct rl+Sh ift +F4  
Global Properties Alt +   Enter
Global New Ct rl+N  
   
Project  
Scope Function Shortcuts  
Global Build All Ct rl+ B  
   
Source Code  
Scope Function Shortcut  
Java Editor Formatting Ct rl+Sh ift +F  
Java Editor Uncomment Ct rl+  
Java Editor Comment Ct rl+/  
Java Editor Add Import Ct rl+Sh ift +M  
Java Editor Organization Import Ct rl+Sh ift +O  
Java editor Use try/cat ch blocks to surround Not set, too commonly used, so list it here, it is recommended to set it yourself.  
It can also be corrected automatically using Ctrl+1.  
   
Run  
Scope Function Shortcut  
Global Single Step Back F7  
Global Single Step Skip F6  
Global Step Into F5  
Global Step Into Selection Ct rl+F5  
Global Debug Last Start F11  
Global Continue F8  
Global Single Step Sh with Filter ift +F5  
global add/remove breakpoints Ct rl+Sh ift +B  
global show Ct rl+D  
global run last start Ct rl+F11  
global run to line Ct rl+R  
global execute Ct rl+U  
   
refactoring  
scope function Shortcut  
Global Undo Refactoring Alt +Shift +Z  
Global Extract Method Alt +Sh ift +MGlobal  
Extract Local Variables Alt +Sh ift +LGlobal  
Inline Alt +Sh ift +IGlobal  
Move Alt +Sh ift +VGlobal  
Rename Alt +Sh ift +RGlobal RedoAlt  
+ Shift +Y 

Guess you like

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