Eclipse Usage Tips

Source: Internet
Author: User

(i) common Eclipse shortcut keys

(1) Ctrl + left mouse button
Used to view the definitions of variables, methods, classes

(2) Ctrl+o
View a schema for a class that lists its methods and member variables. Tip: If you press Ctrl+o again, you can list the methods and variables that the class inherits.
Mnemonic: "O"---> "Outline"---> "outline"
(3) ctrl+t
look at the inheritance tree of a class , which is top-down, and then press once more ctrl+t, which is replaced by a bottom-up display structure.
Tip: Select a method name and press Ctrl+t to see the parent, subclass, and interface of the method with the same name.
Mnemonic: "T"-------> "tree"-----> "Hierarchy tree"

(4) ctrl+/

Comment on the current line, and then cancel the comment

Attention:

The shortcut key is not valid when editing an XML file.
Eclipse XML Comment: CTRL + SHIFT +/
Undo Comment: CTRL + SHIFT + \

(5) Ctrl+shift+f formatting of the current code

(6) Other shortcut keys

ctrl+/(numpad) collapses all code in the current class

Ctrl+x (keypad) expands all code in the current class

Alt+shift+r rename (is my own favorite, especially the variables and classes of rename, than the manual method can save a lot of labor)

Alt+shift+m Extraction Method (This is one of the most common methods of refactoring, especially useful for a whole bunch of mud codes)

Alt+shift+c Modify the function structure (more practical, there are n functions called this method, modified once done)

Alt+shift+l extract Local variables (you can directly extract some magical numbers and strings into a variable, especially when multiple calls are made)

Alt+shift+f change the local variable in class to a field variable (more useful function)

Alt+shift+z reconstruction of Regret medicine (Undo)

Ctrl+alt+h View the hierarchy of relationships in which a function is called by another function

Refer to: http://www.cnblogs.com/syxchina/archive/2010/11/10/2197335.html

Eclipse Usage Tips

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.