Mike Doyal
Mike Doyal

Reputation: 41

Help with Eclipse line wrapping

I'm trying to get something like:

someObject.firstFunctionCall().secondFunctionCall().thirdFunctionCall();

to look like:

someObject.firstFunctionCall()  
          .secondFunctionCall()  
          .thirdFunctionCall()

I played around with the formatting editor and tried searching to no avail. I just can't think of the name for multiple function calls in one statement. I can do it myself but then it reverts to the top example every time I run the formatter.

Upvotes: 1

Views: 369

Answers (1)

robinst
robinst

Reputation: 31437

You'll have to format it yourself.

To configure the formatter to not rewrap already wrapped lines, you can select this option in the "Line Wrapping" section of the formatter:

  • Never join already wrapped lines

Though it will change the indentation of the two lines.

Upvotes: 1

Related Questions