Reputation: 2188
I've been trying to find the option of inserting a blank line before the closing '}' of the class and have not found it.
My goal is to format
interface IShooter {
void incHealth(); // health++
void decHealth(); // health--
int getHealth();
}
to this
interface IShooter {
void incHealth(); // health++
void decHealth(); // health--
int getHealth();
}
Upvotes: 8
Views: 2603
Reputation: 969
This is not possible with stock IntelliJ. If you open up Preferences > Editor > Code Style > Java and then click the Blank Lines Tab. you can see a list of options.
As you can see, there is an option for Maximum Blank Lines Before '}' but unfortunately not for Minimum Blank Lines.
UPDATE:
"Before class end" option was added to "Minimum Blank Lines".
Available since 2018.2 - Youtrack Ticket
Upvotes: 9
Reputation: 73
Settings > Editor > Code Style > Java -> Blank Lines Tab
Before class end: 1
Upvotes: 5