1

I have the following code:

 Arrays.asList(new Point2D.Double(1.00, 3.028571712152178),
     new Point2D.Double(2.00, 4.5990231472038055),
     new Point2D.Double(3.00, 4.816365844337747),
     new Point2D.Double(4.00, 6.018445142602669),

I am using VSCode with Google java style guide.

When I format this bloc of code, I would like to see the following being produced:

 Arrays.asList(new Point2D.Double(1.00, 3.028571712152178), new Point2D.Double(2.00, 4.5990231472038055),
        new Point2D.Double(3.00, 4.816365844337747), new Point2D.Double(4.00, 6.018445142602669),

My goal is to configure the formatter to produce this instead:

 Arrays.asList(new Point2D.Double(1.00, 3.028571712152178), 
        new Point2D.Double(2.00, 4.5990231472038055),
        new Point2D.Double(3.00, 4.816365844337747), 
        new Point2D.Double(4.00, 6.018445142602669),

What is the option to disable the formatter from joining new lines?

Tinker
  • 4,165
  • 6
  • 33
  • 72
  • 1
    This may cause other side effects, but disabling `org.eclipse.jdt.core.formatter.join_wrapped_lines` might do the trick. – Locke Feb 01 '21 at 18:31
  • Have you ever tried the solution i post to your another similar question: [Java formatting: Keep lines but fix indentation](https://stackoverflow.com/questions/65584759/java-formatting-keep-lines-but-fix-indentation/65610174#65610174). – Molly Wang-MSFT Feb 02 '21 at 01:47

0 Answers0