Wrapping chained method calls on a separate line in Eclipse for Java

后端 未结 7 1582
南方客
南方客 2020-12-02 05:10

I haven\'t been successful in figuring out how to wrap each method call in Eclipse. For example, I have this:

someObject.A().B().C();

7条回答
  •  感动是毒
    2020-12-02 05:49

    For those who have eclipse code formatting settings checked into source control (for consistent code formatting across the whole team), the .settings folder is checked in.

    The property that will give you this formatting behavior is in the .settings/org.eclipse.jdt.core.prefs file.

    The property is:

    org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=80
    

提交回复
热议问题