EclipseCodeFormatter icon indicating copy to clipboard operation
EclipseCodeFormatter copied to clipboard

Opening Braket in Construktor is not moved to the new line

Open pmisko opened this issue 1 year ago • 0 comments
trafficstars

If the formating is different than expected:

  • make sure you are comparing with the same Eclipse version
  • provide a code example (both from Eclipse and from IntelliJ) and settings files

What steps will reproduce the issue?

Configuration file contains following setting:

The following test-code was not formatted corectly:

image

This only happens when the first line in constructor body contains a Mockito.when() method with parameters:

  1. with when() works correctly
  2. with when(anyParam) works incorrect

What is the expected result? image

It seems that in the following code sample the formatting for the line with when is generally omitted:

current: image

expected: image

I noticed that when I remove the ending bracket of the class and put it back in, the formatting works correctly.

What happens instead?

Сonsider attaching a screenshot, screencast, or a code sample when it's hard to articulate the problem.

Paste information about IDE and OS (it can be copied from Help | About dialog). IntelliJ IDEA Ultimate 2023.1.3

Please use triple backticks ``` before and after the stacktrace block.

pmisko avatar Oct 04 '24 07:10 pmisko