Eclipse formats code without wrapping
Each time you format your code with Eclipse's Ctrl+shift+f, if the original line of code is greater than 80 columns, eclipse will automatically change to more than one line, which is not very comfortable for you, and simply try it, and you can modify it in the following ways:
1, Preferences->java->code Style->code formatter->show ..., after opening, select the Line Wrapping tab, in the Maximun line width "Specifies how many columns are greater than the line, generally around 150."
2, or in the "Line wrapping" tab, you can select "Lines wrapping Policy" can specify the constructor, method body, and so on.
However, the code style recommended by Sun is by default 80 column wrapping.
1.Java Code
Open Eclipse's Window menu and Preferences->java->code style->formatter->edit/show (depending on the buttons available for different versions)->line Wrapping->maximum line width: Change from 80 to 200.
2.Html Code
Window->preferences->myeclipse->files and editors->html->html source->line width-> default is 72, Save after 150 instead.
After the change, the previous 5,900-line class was formatted once. found that the code is hundreds of lines short. How many lines can a programmer write in a day?