首页 文章

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

提问于
浏览
4

我根据这个问题做了所有:Eclipse: Set maximum line length for auto formatting? .

我的结果:
enter image description here

我试着制作自己的 Profiles . Profiles 已创建:

enter image description here

在ctrl shift之前f:
enter image description here

后:

enter image description here

怎么解决?

4 回答

  • 1

    转到How to Change the Default Format Settings in Eclipse

    按照步骤创建新配置文件 . 步骤11 [Line Wrapping]显示“最大线宽”字段,更改可以解决您的问题 .

    此外,确保在窗口 - >首选项 - > Java - >代码样式 - >格式化程序中的活动配置文件下拉列表中选择了新创建的配置文件 .

    如果您正在尝试格式化XML:转到窗口 - >首选项 - > XML - > XML文件 - >编辑器并更改线宽字段 .

  • 0

    正确答案:
    enter image description here

    附:谢谢 Jon Skeet

  • 0

    You must have to create your own profile

    在eclipse Window-> preferences -> Java -> Code Style -> Formatter 中,编辑配置文件 . 在 Line Wrapping tab 下有线宽选项( Maximum line width

  • 6

    在首选项 Java -> Code Style -> Formatter 中,如果您没有自己的现有配置文件,则使用Eclipse [内置]创建新的或选择并编辑配置文件 . 在Line Wrapping选项卡下是线宽选项(Maximum line width :) .

相关问题