Introduction and use of Eclipse

Source: Internet
Author: User

Common shortcut keys

Shortcut key configuration, common shortcut keys:

Content tip:

Alt +/

For example: System.out.println (); Statement, SYSO and then ALT and/will complete.

Forget how a class is written, write a section, hold down ALT, and/or you'll be prompted.

Quick FIX:

Ctrl + 1

For example, the program has a compile-time exception, or a guide package is required. Use this shortcut. There will be hints.

Guide Package:

Ctrl + SHIFT + O

If you need to import more packages, you can import them all at once, and also clean up the extra packets.

To format a code block:

Ctrl + Shift + F

Code Location Swap:

ALT + upper and lower keys

Add/Remove a single line comment

ctrl+/

Add/Remove Multiple lines of comment

ctrl+shift+/

Ctrl+shift+\

Reset Perspective: Window->reset Perspective

When the Java view of eclipse becomes messy, you can reset the perspective to revert to the original interface.

Uppercase and lowercase conversions

Change to uppercase Ctrl+shift+x

Change to lowercase ctrl+shift+y

Copy rows

Ctrl+alt+ down key

View Source code

1. CTRL + click the class to view the source code

2, Ctrl+shift+t

Delete:

1.Ctrl + D Delete when moving forward

The creation of a class

(method, constructor, encapsulation)

In the class, right-click Source. You can choose to create the Hashcode method, the Equals method, and the ToString method. You can create parameterless constructs with parameter constructs. The Get Set method based on the member's face.

Extraction of methods

Select the block of code that you want to extract as a method, and right-click Refactor->extract method, and enter the name.

Renaming a variable

If the variable is repeated more in a class, you need to modify it, you can select the variable name, and then refactor->rename, the variable with the same name will be modified.

Introduction and use of Eclipse

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.