switch statement format the document

Is this configurable? This is the extension that is formatting the code, right?
@spottedmahn You can try to set the following property:
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
to
See https://github.com/redhat-developer/vscode-java/wiki/Formatter-settings
thanks for the reply!
No luck though 🤷♂️. I also closed and reopened VSCode just incase.

@spottedmahn could you use
<your_project>/.settings/org.eclipse.jdt.core.prefs
instead of
<your_project>/.settings/org.eclipse.buildship.core.prefs
Oh, I should pay closer attention to the details 😜
GTG 🎉, thanks! 🤝


@snjeza can you please make it the default setting in jdt.ls. Current formatting of switch cases makes no sense at all.
Current formatting of switch cases makes no sense at all
Glad I don't stand alone! 😀
There's a rationale for not indenting cases: https://stackoverflow.com/questions/4509039/why-the-strange-indentation-on-switch-statements
But I still find it hurts my eyes. Also Oracle's doc on switch shows indentation: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/switch.html.
The google formatter does the same:
https://google.github.io/styleguide/javaguide.html#s4.8.4-switch
IntelliJ IDEA and Netbeans indent cases by default too.
Current formatting of switch cases makes no sense at all
After reviewing the PR it makes more sense. It's not that someone said "default it this way". It's that it was missed.
Thanks for fixing the default!
someone said "default it this way" -> that someone is Eclipse JDT. Our fix overrides JDT's default
Most helpful comment
There's a rationale for not indenting cases: https://stackoverflow.com/questions/4509039/why-the-strange-indentation-on-switch-statements
But I still find it hurts my eyes. Also Oracle's doc on switch shows indentation: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/switch.html.
The google formatter does the same:
https://google.github.io/styleguide/javaguide.html#s4.8.4-switch
IntelliJ IDEA and Netbeans indent cases by default too.