Eclipse设置忽略手动格式化代码的格式

时间:2016-06-16 14:28:02

标签: java eclipse

所以我正在构建如下网址:

<div class="explain_container">
    <div class="explain_text">
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
        Text that's longer should extend the height of the box.
    </div>
</div>

按Ctrl + Shift + F后,格式更改为:

final URL url = new URLBuilder().withPath("/basePath/servicePath/")
                                .withQueryParam("param", "paramValue")
                                .buildURL();

如果有人可以帮助我在首选项中使用适当的eclipse设置,那将非常感激,这样就不会发生这种情况。

谢谢!

1 个答案:

答案 0 :(得分:0)

这是我发现完成这项工作的内容。转到:

窗口 - &gt;偏好 - &gt; Java - &gt;格式化程序 - &gt;编辑 - &gt;线包装 - &gt;功能 呼叫

换行政策 - &gt;包裹所有元素,如果没有必要,除了第一个元素(5/5)

缩进政策:第5栏(第5页,共5页)缩进