Ctrl+Shift+F shortcut keys in MyEclipse do not wrap when formatting code

Eclipse format code without wrapping

Every time you format the code with Ctrl+shift+f that comes with Eclipse, if the original line of code is larger than 80 columns, Eclipse will automatically change it to multiple lines. This is not very comfortable for me, so I just tried it and passed the following The method can be modified:
    1. Preferences->Java->Code Style->Code Formatter->Show... After opening, select the "Line Wrapping" tab, and wrap the line when the "Maximun line width" specifies more than how many columns.
    2. In the "Line Wrapping" tab, you can specify the line wrapping of constructors, method bodies, etc. by selecting "Line Wrapping policy".
     However, the coding style recommended by SUN defaults to 80-column newlines.


1. The Java code
opens the Window menu of Eclipse, then Preferences->Java->Code Style->Formatter->Edit/Show (the buttons available will be different according to different versions) ->Line Wrapping->Maximum line width: from 80 Just change it to 800.

 

2. Html code
Window->Preferences->MyEclipse->Files and Editors->Html->Html Source->Line width->Add a 0 and save it later.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326148928&siteId=291194637