Detailed list of commonly used Eclipse shortcut keys in android Development

Source: Internet
Author: User

Eclipse shortcut key-Easy to search, haha, bad memory
Line comment/pin comment Ctrl +/block comment/pin comment/XML comment Ctrl + Shift +/Ctrl + Shift + \
Search and replace Ctrl + H Ctrl + F
Find the next/back query Ctrl + K Ctrl + Shift + K
Jump to a line of Ctrl + L, HA is used to Editplus, from time to time will knock down Ctrl + G,
Find the Declaration Ctrl + G of the current element
Search for all references of the current element Ctrl + Shift + G
Reorganizing Import Ctrl + Shift + O can help you remove all unused Import statements at a time!
Quick Fix Ctrl + 1
Introduce a class (Interface) ctrl + shift + m
Add head comment shift + alt + j

Change the launch page. android: name = ". ResultDemoActivity" in the first activity tag of AndroidManifest. xml"
Change ResultDemoActivity to the activity you want to start first.

Unformat block comments ":
Windows-> Preferences-> Java-> Code Style-> Formatter-> Edit-> Comments, and then deselect the Enable block comment formatting check box.

Edit related shortcuts

Eclipse has powerful editing functions, master the Eclipse shortcut key function, and greatly improve development efficiency. Eclipse has the following shortcut keys related to editing.
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 attributes, experience the benefits of the [ALT +/] 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. Press Ctrl +/to restore again.
Quickly add comments to quickly add comments or cancel comments for the row where the cursor is located or the row selected. You may always need to comment something or cancel comments during debugging. Now, duplicate comments are not required for each line.

4. [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.

5. [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.

View and locate shortcuts

In the program, it is not easy to quickly locate the location of the code and quickly locate the Bug. Eclipse provides powerful search functions, you can use the following shortcut keys to search for and locate data.

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]
Corresponds to Ctrl + Shift + T. You can also use wildcards to find all files (including Java files) in a Workspace.

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

5. [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 [Ctrl + Shift + O] shortcut key, which will surely surprise you.

6. [Ctrl + Shift + F] Standard Code
Formatting code and writing standardized code are a required course for every programmer, after selection, press the Ctrl + Shift + F shortcut to format the Code. If no code is selected, the current file (Java file) is formatted by default ).

7. [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 ).

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

9. [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.

10. [F3]
Quickly locates a class, method, and attribute at the cursor position.

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

12. [first press "/" and then press "*", or press Alt + Shift + J before the method name to add Javadoc comments]
Method comment

Debugging shortcuts

Eclipse has the following shortcut keys related to running debugging.

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]: trace the method. When the program executes a method, press [F5] to track the method.
5. [F6]: One-step execution program.
6. [F7]: After the method is executed, the last statement that calls this method is returned.
7. [F8]: continue to run until the next breakpoint or program ends.

Common editor shortcuts

Generally, the text editor provides editing-related shortcut keys, which can be used in Eclipse to edit text.
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

There are still many shortcut keys in Eclipse that cannot be listed one by one. You can find their usage methods through the help documentation. There are also several common 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.

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.