Shortcuts used in Android development

Source: Internet
Author: User
Tags delete key

Shortcuts used in Android development

Eclipse shortcut Keys-Easy to find, huh, bad memory line comment/Pin comment ctrl+/block comment/Pin comment/xml comment ctrl+shift+/ctrl+shift+\ find find replace Ctrl+h ctrl+f Find Next/Go back ctrl+k Ctrl+shift+k jump to a line ctrl+l, ha used to editplus, and occasionally will knock down ctrl+g, find the current element of the declaration ctrl+g find all references to the current element ctrl+shift+g reorganize import Ctrl+shift+o, can help you remove all unused import declarations at once! Quick Fix Ctrl+1 introduces a class (interface) Ctrl + SHIFT + M Add header comment Shift + ALT + J

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

Cancel formatting of block annotations: Windows->preferences->java->code style->formatter->edit->comments, then cancels the "Enable Block comment Formatting "is checked.

Edit related shortcut keys

Eclipse's editing capabilities are powerful, and mastering the Eclipse shortcut key capabilities can greatly improve development efficiency.    There are several shortcut keys related to editing in Eclipse. 1. "alt+/" Automatic Prompt method This shortcut is a good helper for the user to edit, can provide users with the content of the assistant, do not worry about the method and the name of the property, when not the whole class, methods and attributes of the name, more Experience "alt+/" shortcut key benefits.

2. "Ctrl+o" shows an outline of the methods and properties in a class that can quickly locate the methods and properties of a class and is useful when looking for bugs.

3. "ctrl+/" Press again to quickly add comments, can be in the line of the cursor or the selected line to quickly add comments or uncomment, when debugging may always need to comment on something or uncomment, now well, do not need to repeat each line of comments.

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

5. "Ctrl+m" window to maximize and restore, 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.

Viewing and locating shortcut keys

In the program, quickly locate the location of the code, quickly find the place where the bug is very difficult, Eclipse provides a powerful search function, you can use the following shortcut keys to help complete the job of locating.

1. "Ctrl+k", "ctrl++shift+k" quickly down and up to find the selected content, it is no longer necessary to use the mouse to click the Find dialog box.

2. The Java class file can be found in the "Ctrl+shift+t" lookup workspace (Workspace) build path, not to find the class, and you can use "*", "? "And so on wildcard characters.

3. "Ctrl+shift+r" and "ctrl+shift+t" correspond to find all files (including Java files) in the workspace (Workspace), or you can use wildcard characters.

4. "Ctrl+shift+g" finds references to classes, methods, and properties. This is a very useful shortcut key, such as to modify the code that refers to a method, you can quickly locate all references to this method by using the "ctrl+shift+g" shortcut key.

5. "Ctrl+shift+o" rapid generation of import, when copying a program from the Internet, do not know how to import into the called class, try "ctrl+shift+o" shortcut keys, there will be surprises.

6. "CTRL+SHIFT+F" specification code format code, writing format specification code is a compulsory lesson for every programmer, when you see a piece of code is very uncomfortable, select and press "ctrl+shift+f" shortcut key can format this code, If you do not select the code, the current file (Java file) is formatted by default.

7. "Alt+shift+w" locates the path in the project where the current file is located, and can quickly locate the browser view, which is useful if you want to find a package that contains a file (especially in larger projects).

8. "Ctrl+l" is positioned to a row in the current editor and is also valid for non-Java files.

9. "Alt+←", "alt+→" back history and forward history are very useful in tracking code, and the user may have found several associated places, but it may not be clear that these two shortcuts can be used to locate the order of lookups.

10. "F3" quickly locates a class, method, and property of the cursor position.

11. "F4" displays the inheritance relationship of the class and opens the Class inheritance view. 12. "Knock First"/"hit two * *, then enter or press Alt+shift+j before the method name to add Javadoc comment" method comment

debugging shortcut keys

There are several shortcut keys in eclipse that are related to running debugging.

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": Trace into the method, when the program executes to a method, you can press the "F5" key to trace to the method.    5. "F6": Step Into the program.    6. "F7": Executes the method, returning to the next statement that called this method. 7. "F8": Continue execution to the next breakpoint or end of the program.

Common editor shortcut keys

Usually the text editor provides some shortcut keys related to editing, which you can also use 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": Undo.    6. "Ctrl+y": Repeat. 7. "Ctrl+f": Find.

Other shortcut keys

There are many shortcuts in eclipse that cannot be enumerated, and users can find out how to use them through the Help document, as well as several common 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

Shortcuts 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.