Detailed parsing of Eclipse shortcut keys commonly used in Android development

Source: Internet
Author: User

1. View the local Window->preferences->general->keys defined by the shortcut key.

2. Change the start Page android:name= "in Androidmanifest.xml First Activity tab item. Resultdemoactivity "resultdemoactivity change to the activity you want to start with first.

3. Cancel the format of block annotations Windows->preferences->java->code style->formatter->edit->comments, and then deselect the "Enable Block comment Formatting "is checked.

Edit related shortcut keys

1. "alt+/" Automatic Prompt method

This shortcut key for the user to edit the good helper, can provide users with content assistance, do not worry about the method and the name of the property, when not the whole class, methods and attributes of the name to experience the benefits of this shortcut.

2. "Ctrl+o"

shows an outline of the methods and properties in a class that quickly locates the methods and properties of a class and is useful for finding bugs.

3. "ctrl+/" Quick Add/Cancel Comment,

The ability to quickly annotate or uncomment a line or selected line of the cursor, or to annotate something or uncomment it at the time of debugging, without repeating the comments on each line.

4. "ctrl+shift+/", "ctrl+shift+\" block comment/Pin comment/xml Comment

Allows you to quickly add comments or uncomment the cursor selection.

5 "Ctrl+d"

Delete the current line, which is also the author's favorite one, do not have to delete a row and press so many times the delete key.

6. "Ctrl+m"

Window maximization and restore, when the user in the window to operate, always feel that the current window is small (especially when writing code), now good, try "ctrl+m" shortcut keys.

7. "Ctrl+shift+s" Global Save

Used to check for XML errors and provide resources. Eclipse does not check syntax errors in real time when writing XML documents, and Eclipse does not intelligently prompt if you write resource, layout-related information is not saved.

8. "Ctrl+1" quick fix

When inheriting certain base classes or interfaces, eclipse will error because there are no virtual methods to implement these classes or interfaces. Move the cursor to the place where the error picture Red Line, use this shortcut key, in the pop-up menu, "Add unimplemented methods", you can get the virtual method to be implemented.

9. "Shift+enter", "shift+ctrl+enter" Insert blank line

Inserts a blank line below or above the current cursor position.

10. "Ctrl+alt+↓", "ctrl+alt+↑" copy when moving forward

Ctrl+alt+↓ copies the current line to the next row, ctrl+alt+↑ copies the current line to the previous row. It should be explained that this shortcut key in Ubuntu with the workspace switch conflict, it is recommended to change to ctrl+↑.

11. "Alt+↑", "alt+↓"

The top and bottom two lines swap locations. You can swap the position of the upper and lower lines, or the selected lines with the upper and lower line, and the shortcut key swapped with the previous line is Alt+↑, and the shortcut key swapped with the next line is alt+↓.

12. "Ctrl + Shift + M"

Introduce a class (interface)

Viewing and locating shortcut keys

1. "Ctrl+k", "Ctrl++shift+k"

Find the selection quickly down and up, and you no longer need to click the Find dialog box with your mouse.

2. "Ctrl+shift+t"

Find a Java class file in the search workspace (Workspace) build path, and do not suffer for the class being found, and you can use "*", "? "And so on wildcard characters.

3. "Ctrl+shift+r"

Find all the files (including Java files) in the workspace (Workspace), or use wildcard characters.

4. "Ctrl+g"

Find the declaration of the current element

5. "Ctrl+shift+g"

Find references to classes, methods, and properties. This is a very useful shortcut key, for example, to modify the code that references a method, you can quickly position all references to this method by using this shortcut key.

6. "Ctrl+shift+o"

Quickly generate import, when copying a program from the Internet, do not know how to import into the called class, try "ctrl+shift+o" shortcut keys.

7. "CTRL+SHIFT+F" specification code
The code for writing the format specification is a required lesson for every programmer, and when you see a piece of code that is extremely uncomfortable, you can format the code by pressing this shortcut when you select it, and if you do not select the code, 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, which is useful if you want to find a package that contains a file (especially in larger projects).

9. "Ctrl+l"

Navigates to a row in the current editor and is also valid for non-Java files.

10. "Alt+←", "alt+→"

Backward history and forward history are useful in tracking code, and users may find several associated places, but they may not be able to remember the order in which they are located by these two shortcut keys.

11. "F3"

A class, method, and property that quickly locates the cursor position.

12. "F4"

Displays the inheritance relationship for the class and opens the Class inheritance view.

13. "Knock First"/"Knock on two * * *, then enter or press Alt+shift+j before the method name to add Javadoc comment"

Method Comment

14. "Ctrl+h" search

You can find or find replacements for the entire project

Debugging shortcut Keys

1. "Ctrl+shift+b": Sets a breakpoint at the current line or cancels the set breakpoint.

2. "F11": Debug the Last executed program.

3. "Ctrl+f11": Run the last executed program.

4. "F5": one-step tracking into the method.

5. "Ctrl+f5": one-step jump into the selection.

6. "Shift+f5": Single Step with filter.

7. "F6": Step Into the program.

8. "F7": Executes the method, returning to the next statement that called this method.

9. "F8": Continue execution to the next breakpoint or end of the program.

10. "Ctrl+d": Display.

11. "Ctrl+r": Run To line.

12. "Ctrl+u": Execution

Common editor shortcut keys

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": Repeat.

7. "Ctrl+f": Find.

other shortcut keys

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.

Detailed parsing of Eclipse shortcut keys commonly used in Android development

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.