Else if formating in Intellij
Which settings should I apply to make all else if statements aligned to the first one when I click CTRL+ALT+L (reformat code)?
Please note that I want to have "else" on a new line.
Take a look at the attachment to see how "else if" statements progressively move to the right which is what I want to avoid.
I am using intellij 8.1.
Attachment(s):
elseifalignment.PNG
Please sign in to leave a comment.
That's odd, I've never seen that. In Code Style under Alignment and Braces there's a 'Special "else if" treatment' checkbox, does that help? Otherwise it would help if you posted your settings here, AFAIK there's no single setting that should cause that behaviour.
Cheers,
Colin
Yes, this is checked on my settings. See the attachment.
If this is not checked, if and else are at separate lines.
Attachment(s):
settings.PNG