Viewing method:
1. login to Silicon Valley power online watch: http://www.enet.com.cn/article/2006/0704/A20060704124810.shtml
2. access through the hyperlink on the website of the cownew team:
Http://www.cownew.com/kc/
The first four courseware lectures are provided:
1. Basic use of eclipse
1. Eclipse project establishment
2. concepts such as source folder
3. Write basic code
Ii. Basic eclipse operations (1)
1. Create packages, interfaces, and other
2. Advanced project configuration
3. Construction of the project
3. Automatic completion and correction of codes
Yellow/red logo
(1) Automatic Generation of methods
(2) Import
(3) Clear useless Import
(4) automatically clear useless methods and variables
(5) methods that automatically implement interfaces and abstract classes, and automatically reload parent classes
3. Basic eclipse operations (2)
1. Java debugging
(1) breakpoint, condition breakpoint, and exception breakpoint
(2) view the variable in the breakpoint and execute the statement
2. Intelligent Error Correction and Automatic completion:
(1) automatically generate try... catch, automatically list the exception list, and automatically transform... click the mouse on the red prompt to get a surprise.
(2) automatically generate the set and get Methods
(3) automatically generate constructor,
(4) Automatic javadoc generation
Fourth, eclipse advanced operations (1) Reconstruction
I. Overview
1. Good programs should be constantly reconstructed. Eliminate bad smell and improve code readability, maintainability, and scalability. Refactoring: improving the design of existing code
2. Eclipse's automatic refactoring function supports renaming of various program elements and automatically updates references. Eclipse supports moving methods and fields between classes and automatically updating references. Eclipse supports updating and replacing inline fields and functions. Eclipse supports extraction methods, variables, and other program elements.
3. The reconstruction of eclipse supports undo and redo, and can preview the reconstruction results, prompting for the reconstruction results that may cause errors. Therefore, it is safe to use eclipse for refactoring.
2. Difficult reconstruction-practical reconstruction
1. Method extraction extract Mehod:
Extract the parameter verification part of caclcost into the verify method.
2. Rename
(1) Rename the class test1 to costcalculator.
(2) Rename user to userinfo
3. inline inlining
Inline Method Add
4. Constant extraction extract constant:
Extract "normal" and "VIP" into Constants
5. Extract the local variable extract local variable.
Extract user. usertype into a variable
6. Packing field encapsulate Field
Restructured the user class and wrapped it with set get.
7. Extract interface extraction Interface
Icostcalculator extraction interface in costcalculator