Is it possible to tell IntelliJ to put empty block on one line when formatting Java files.
I'd like this:
@Override
public void onClickPositive(int tag, Object payload) {
}
To automatically become this:
@Override
public void onClickPositive(int tag, Object payload) {}
There is no way to do it for reformatting code.
This can only be done manually.
Check your Code Style settings, under "Alignment and Braces" to preserve your formatting.
You should find a "Simple methods in one line" option there. Check it and clear the "Line breaks" check box.
Enable following Simple blocks in one line
code style in settings.
Settings > Editor > Code Style > Java > Wrapping and Braces > Keep when reformatting > Simple blocks in one line