在每个函数后开始新的一行。

huangapple go评论70阅读模式
英文:

Java/Eclipse formatter to begin a new line after each function

问题

我在Eclipse中遇到了一些属性问题。我想让我的格式化程序(或任何格式化程序)在每个函数后插入一个新行。像这样:

Object myObject = create("this").with("this1")
    .with("this2")
    .with("this3")
    .with("this4");

有人可以帮助我吗?谢谢。

英文:

I am stuck with some properties in Eclipse. I would like my formatter (or any formatter) to put a new line after each function. Like:

Object myObject = create("this").with("this1")
    .with("this2")
    .with("this3")
    .with("this4");

Can someone help me out? Thanks

答案1

得分: 1

在格式设置中,将Line Wrapping > Wrapping settings > Function Calls > Qualified invocations设置为包装所有元素,除非第一个元素不必要

英文:

In the formatter settings, set Line Wrapping > Wrapping settings > Function Calls > Qualified invocations to Wrap all elements, except first element if not necessary.

huangapple
  • 本文由 发表于 2020年8月8日 23:11:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/63316946.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定