Eclipse: Set maximum line length for auto formatting?

I am working with Java. If I hit Ctrl+Shift+F in Eclipse Helios, it will auto format my code. At a certain point, it wraps lines. I would like to increase the maximum line length. How can I do this?


In preferences Java -> Code Style -> Formatter , edit the profile. Under the Line Wrapping tab is the primary option for line width (Maximum line width:). In the Comments tab you have a separate option Maximum line width for comments:, which will also need to be changed to affect comment wrapping.

You will need to make your own profile to make these changes in if you using one of the [Built-in] ones. Just click "New..." on the formatter preferences page.


Take a look of following image:

Java->Code style->Formatter-> Edit

在这里输入图像描述


评论有自己的行长设置在设置页面的底部java-> code style-> formatter-> Edit ...-> comments

链接地址: http://www.djcxy.com/p/90608.html

上一篇: 停止Eclipse关闭和打开引号内新行的引号

下一篇: Eclipse:设置自动格式化的最大行长度?