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