Eclipse usage and Tip 18: Reduce unnecessary input

Source: Internet
Author: User

When writing code, many people have a principle and try to enter it. Rely on the IDE automatically generated code, general readability, typesetting and so on are still good, the main general will not have any low-level errors. Today you'll look at a few of the things that you typically do with eclipse in your eclipse environment. First, when implementing a method, local variables are often used, and the initialization values of these local variables come from some methods of some objects, and because of the high priority of local variables in the method, the same name can overwrite scopes and so on. You can enter the method name directly and automatically match the generated local variable, as shown in:
Step One: Direct Input method, of course, here you can use the shortcut key alt+/automatic completion:

Step two: Press and hold the Divine key CTRL + 1 to bring up the dialog box shown:

The dialog box generated in step 3:2, the first one is to generate local variables, the second is to generate the scope of the class, here Select one, can be automatically generated.

Also in Eclipse, if you encounter a cast, you do not have to enter it yourself. Direct input expression, press and hold the Divine key ctrl+1 can automatically increase the forced conversion, less input is less input, high efficiency, accurate rate, why not.

Previous article, Eclipse usage and tip 17: Overriding the parent class method:
http://blog.csdn.net/ts1122/article/details/9152963
Next article, Eclipse usage and tip 19: Eclipse modifies workspace:
http://blog.csdn.net/ts1122/article/details/9325023

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Eclipse usage and Tip 18: Reduce unnecessary input

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.