Code formatting wrapping long lines issue

Answered

Is there a way to tell IDEA not to split method name and braces when wrapping long lines?

Example: I have a line of code

softly.assertThat(disclosure.getPositionName()).isEqualTo(COMPANY_DIRECTOR_RELATION_DETAIL.getCompanyPosition().getName());

which is longer than 120 characters and I want it to be split like this

softly.assertThat(disclosure.getPositionName()).isEqualTo(COMPANY_DIRECTOR_RELATION_DETAIL.getCompanyPosition()

.getName());

but what I got after running IDEA formatting is 

softly.assertThat(disclosure.getPositionName()).isEqualTo(COMPANY_DIRECTOR_RELATION_DETAIL.getCompanyPosition

().getName());

i.e. the braces of getCompanyPosition went to the another line which looks awful.

My version of IDEA is Ultimate 2017.2.4

0
2 comments

What are your settings for the braces placement?

0

Please sign in to leave a comment.