Eclipse develops JAVA or XML-common shortcut keys __java

Source: Internet
Author: User
Eclipse shortcuts-Easy to find, hehe, 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/Find Ctrl+k ctrl+shift+k
Jump to a line ctrl+l, ha used to EditPlus, occasionally will knock down ctrl+g,
Find the declaration for the current element ctrl+g
Finds all references to the current element ctrl+shift+g
Re-organize import ctrl+shift+o to help you remove all unused import declarations at once.
Quick Fix ctrl+1
Introduce a class (interface) CTRL + SHIFT + M
Add header Note Shift + ALT + J

Change the startup page android:name= in the Androidmanifest.xml First Activity tab entry. Resultdemoactivity "
Resultdemoactivity Change the activity you want to start first

To cancel formatting a block annotation:
Windows->preferences->java->code style->formatter->edit->comments, and then cancel the Enable block comment Formatting "tick.

Edit related shortcut keys

Eclipse is very powerful in its editing capabilities, and can greatly improve development efficiency by mastering the Eclipse shortcut key features. The following are some of the key shortcuts in eclipse that are related to editing.
1. "alt+/" Automatic Prompt method
This shortcut for the user to edit a good helper, can provide users with the content of the auxiliary, do not remember the whole method and attribute name, when the name of not all the class, method and attributes, more experience the "alt+/" shortcut keys bring benefits.

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

3. "ctrl+/" to resume once again
Quickly add comments that enable you to quickly annotate or uncomment the row or selected line of the cursor, and you may need to annotate something or uncomment it while you are debugging, so now you don't need a duplicate comment for each line.

4. "Ctrl+d"
Delete the current row, which is also one of the author's favorite, do not have to delete a row and the deletion of the key so many times.

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

View and position shortcut keys

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

1. "Ctrl+k", "Ctrl++shift+k"
Find the selection quickly down and up, and you will no longer need to click the Find dialog box with your mouse.

2. "Ctrl+shift+t"
Find the Java class file found in the workspace (Workspace) build path, and do not suffer for a class that cannot be found, and you can use "*". "The wildcard character.

3. "Ctrl+shift+r"
As with "Ctrl+shift+t", Find all the files (including Java files) in the workspace (Workspace), or you can use wildcard characters.

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

5. "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, there will be surprises.

6. "Ctrl+shift+f" specification code
Format code, writing format specification code is a compulsory course for every programmer, when you see a piece of code very uncomfortable, select and press the "ctrl+shift+f" shortcut key to format this code, if not selected code is the default format of the current file (Java file).

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

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

9. "Alt+←", "alt+→"
Back history and forward history are useful for tracking code, and users may have looked up several related places, but may not be able to remember the order in which they are located.

10. "F3"
A quick way to locate 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"/"Knock two * * *, then enter or press Alt+shift+j before the method name to add Javadoc annotation"
Method Comment

Debugging shortcut Keys

Some of the following shortcut keys for running debugging are available in eclipse.

1. "Ctrl+shift+b": a breakpoint that sets a breakpoint or cancels the setting on the current line.
2. "F11": Debug the Last execution of the program.
3. "Ctrl+f11": Run the last program executed.
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": Step to execute the procedure.
6. "F7": After executing the method, return to the last statement that called this method.
7. "F8": Continue execution to the next breakpoint or program end.
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.