Eclipse:设置自动格式化的最大行长度? [英] Eclipse: Set maximum line length for auto formatting?

查看:139
本文介绍了Eclipse:设置自动格式化的最大行长度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Java。如果我在Eclipse Helios中点击 Ctrl + Shift + F ,它将自动格式化我的代码。在某一点上,它包裹线。我想增加最大线路长度。如何做到这一点?

解决方案

在首选项 Java - >代码样式 - >格式化程序个人资料在行包装选项卡下,线宽(最大线宽:)的主要选项。在评论标签中,您有一个单独的选项评论的最大行宽度,这也需要更改以影响评论换行。



如果您使用 [Built-in] 之一,则需要使自己的个人资料进行更改。只需在格式化程序首选项页面上单击新建...。


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.

这篇关于Eclipse:设置自动格式化的最大行长度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆