d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > One-line Function Formatting In Intellij Idea
Add Reply New Topic New Poll
Member
Posts: 5
Joined: Jul 11 2022
Gold: 0.00
Nov 7 2022 04:28am
IntelliJ continues to format this:
Code
public void addElement(Element elem) {
this.elements.add(elem);
}

into consideration:
Code
public void addElement(Element elem) { this.elements.add(elem); }

There are various types of branching statements such as break, continue and return statements that transfer the control of execution to a specific point in the code. I like the multi-line formatting better. How do I notify IntelliJ about this? In Settings -> Editor -> Java -> Wrapping and Braces, I unchecked the following options. This is the source of information I've read but that didn't help. [URL]https://www.scaler.com/topics/control-statements-in-java/[/URL]
One-line control statements
Simple blocks on a single line
In one line, simple ways
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll