Allman-Style in Inteligi

I was wondering how I can set up Intelliji IDEA to generate my code automatically:

public void Something()
{
// something
}

      

but not:

public void Something() {
// something
}

      

I believe this is called the "Allman" style. However Intelliji crashes using "K & R" style (I guess?).

+3


source to share


2 answers


go to project settings. customize code style formatting.



+5


source


To make Allman for Java (newbie-ish version) go to File / Preferences / Editor / Code Style / Java. Then select the Wrap and Snaps tab and expand the bracket location. Now you should click End of Line for all three options and select Next Line for each in the window that appears. Then click "Apply" and "OK".



+1


source







All Articles