Common techniques for Eclipse

Source: Internet
Author: User

Using Java for project development use the IDE, and Eclipse is one of the most useful tools. It's been a while since I've been learning Java for a while, so summarize some of the common shortcuts and tips for using the eclipse process. In the process of using tool development, if you can master some of the commonly used shortcuts and skills, it will certainly work more effectively.

One: Debugging of the program

F5:step into (stepping into): Entering the method body

F6:step over (Single step Skip): Commonly known as single Step execution

F7:step return (single-step Return): Returns from the Hop-in method

Resume: The function is to perform a jump to the next breakpoint, if not the next, will run the complete program.

(This is a skill that is often useful in grey.) If you need to skip several lines of code during debugging, the resume will definitely save you from the endless F6.

Drop to Frame: Jumps to the first line of the current method

(If you are accidentally in the process of debugging, skip a statement.) No restart debugging!!! Simply clicking on drop to frame will send you back to the first line of the method. )

Watch: Observe the value of a variable or an expression

(In the process of debugging often to observe the values of some variables and expressions, right-click to find watch can be very convenient to meet your needs.)

   Special Note: We must clear all breakpoints in the Breakpoints view after the breakpoint has been debugged, and turn off the JVM. Otherwise the computer will be stuck in an inexplicable situation.

Two: Common shortcuts for Eclipse (use some of the shortcuts that are commonly used, which makes your development easier.)

Content Tip (Assist): alt+/

Quick FIX: Ctrl+1

Guide Package: Ctrl+shift+o

Format code block: ctrl+shift+f

Forward backward: Alt + Left and RIGHT arrow keys

Add Comment: ctrl+shift+/

Remove Comment: ctrl+shift+\

View method Description: F2

Reset Perspective: Window-->reset Perspective

Change to uppercase: Ctrl+shift+x

Change to lowercase: ctrl+shift+y

Copy line: ctrl+alt+ down ARROW

Swap the Order of statements: ALT + up and down keys

To view the inheritance relationship for a class: Ctrl+t

View Source code: CTRL + Mouse on (ctrl+shift+t)

See all shortcut keys: ctrl+shift+l

Three: How to modify shortcut keys?

Window--->preferences, enter keys in the search box. You can then configure Eclipse's shortcut keys based on your favorite preferences.

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.