Detailed analysis of commonly used Eclipse shortcut keys in android Development
1. view the shortcut key definition Window> Preferences> General> Keys.
2. Change the android: name = ". ResultDemoActivity" ResultDemoActivity In the first activity tag of AndroidManifest. xml to the activity you want to start first.
3. unformatting block Comments Windows-> Preferences-> Java-> Code Style-> Formatter-> Edit-> Comments, then, uncheck Enable block comment formatting.
Edit related shortcuts
1. [ALT +/] automatic prompt Method
This shortcut key is a good helper for users to edit and can help users with content. Do not worry about incomplete methods and attribute names, when you do not remember the names of classes, methods, and properties, try the benefits of this shortcut key.
2. [Ctrl + O]
Display the class method and attribute outline, and quickly locate class methods and attributes, which are useful in searching for bugs.
3. [Ctrl +/] Quickly add/cancel comments,
You can quickly add or cancel comments to or from the row where the cursor is located or selected. During debugging, you may always need to comment out something or cancel the comments without repeated comments on each line.
4. [Ctrl + Shift +/], [Ctrl + Shift + \] block comment/pin comment/XML comment
You can add or cancel a comment for the selected quick button.
5 [Ctrl + D]
Delete the current row, which is one of my favorites. You do not have to press the delete key multiple times to delete a row.
6. [Ctrl + M]
The window is maximized and restored. When you operate in the window, you will always feel that the current window is small (especially when writing code). Now, try the Ctrl + M shortcut.
7. [Ctrl + Shift + S] Save globally
Used to check XML errors and provide resources. Eclipse cannot check syntax errors in real time when writing XML documents. If the information about Resource and Layout is not saved, Eclipse will not prompt intelligently.
8. [Ctrl + 1] Quick correction
Eclipse reports an error when Inheriting some base classes or interfaces because the virtual methods of these classes or interfaces are not implemented. Move the cursor to the place where the red line is reported. Use this shortcut key and select "Add unimplemented methods" in the pop-up menu to get the virtual method to be implemented.
9. [Shift + Enter] and [Shift + Ctrl + Enter] Insert blank lines
Insert a blank line below or above the current cursor position.
10. [Ctrl + Alt + ↓] and [Ctrl + Alt + ↓] copy the current row.
Ctrl + Alt + ↓ copy the current row to the next row, Ctrl + Alt + ↓ copy the current row to the previous row. Note that this shortcut key conflicts with the workspace switch in Ubuntu. We recommend that you change it to Ctrl + restart.
11. [Alt + ↓] and [Alt + ↓]
Positions of the upper and lower lines. The positions of the upper and lower rows can be reversed, or the selected rows and the upper and lower rows can be reversed. The shortcut key for the opposite line is Alt + ↓, the shortcut key for the next line is Alt + ↓.
12. [Ctrl + Shift + M]
Introduce a class (Interface)
View and locate shortcuts
1. [Ctrl + K] and [Ctrl + + Shift + K]
You can quickly search for the selected content down and up. You no longer need to click the Search dialog box.
2. [Ctrl + Shift + T]
You can find the Java class files in the Workspace build path. Do not try to find the classes. You can also use "*" and "?" .
3. [Ctrl + Shift + R]
Search for all files (including Java files) in a Workspace, or use wildcards.
4. [Ctrl + G]
Find the declaration of the current element
5. [Ctrl + Shift + G]
Search for reference of classes, methods, and properties. This is a very practical shortcut. For example, to modify the code that references a method, you can use this shortcut to quickly locate all the locations that reference this method.
6. [Ctrl + Shift + O]
Quickly generate import. If you copy a program from the Internet and do not know how to import the called class, try the shortcut key Ctrl + Shift + O.
7. [Ctrl + Shift + F] Standard Code
The code with standardized writing format is a required course for every programmer. When you see a piece of code that is not pleasing to the eye, you can press this shortcut key to format the code, if no code is selected, the current file is formatted by default.
8. [ALT + Shift + W]
Find the path in the project where the current file is located, and 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 large projects ).
9. [Ctrl + L]
Locate a line in the current editor, which is also valid for non-Java files.
10. [Alt + ↓] and [Alt + →]
The backward and forward history records are very useful in tracking code. You may have found several associated areas, but you may not be clear about them, you can use these two shortcut keys to locate the search sequence.
11. [F3]
Quickly locates a class, method, and attribute at the cursor position.
12. [F4]
Display the inheritance relationship of the class and open the class inheritance view.
13. [first press "/" and then press "*", or press Alt + Shift + J before the method name to add Javadoc comments]
Method comment
14. [Ctrl + H] Search
You can search for or replace the entire project
Debugging shortcuts
1. [Ctrl + Shift + B]: Set a breakpoint or cancel a breakpoint in the current row.
2. [F11]: debug the program that was last executed.
3. [Ctrl + F11]: run the program that was last executed.
4. [F5]: The method is tracked in one step.
5. [Ctrl + F5]: Skip to select one step.
6. [Shift + F5]: Use the filter for one-step execution.
7. [F6]: One-step execution program.
8. [F7]: After the method is executed, the last statement that calls this method is returned.
9. [F8]: continue to run until the next breakpoint or program ends.
10. [Ctrl + D]: display.
11. [Ctrl + R]: run to the row.
12. [Ctrl + U]: Run
Common editor shortcuts
1. [Ctrl + C]: Copy.
2. [Ctrl + X]: cut.
3. [Ctrl + V]: paste.
4. Ctrl + S: Save the file.
5. [Ctrl + Z]: Undo.
6. [Ctrl + Y]: repeated.
7. [Ctrl + F]: search.
Other shortcuts
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.