Skip to content

Opening Braket in Construktor is not moved to the new line #273

Open
@pmisko

Description

@pmisko

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Opening Braket in Construktor is not moved to the new line · Issue #273 · krasa/EclipseCodeFormatter