Do not break switch case Permanently deleted user 创建于 2019年11月07日 09:05 Is there a way to keep case and return in a switch statement on the same line? Currently if I format the code, it breaks after the ":" : But I would like to keep it like this: Any suggestions?
There's no such option.
You can:
1) submit this as a feature request to our tracker at https://youtrack.jetbrains.com/newIssue
2) enable Formatter Control (the tab) at Preferences/Settings | Editor | Code Style. And add //@formatter:off and //@formatter:on comments surrounding the regions you don't want IDE to mess with
2 years later, same Question?!?
Unfortunately, it is still impossible, here is a ticket to vote for:
https://youtrack.jetbrains.com/issue/WI-48433
I will leave a link to this forum thread to its internal comments to increase the ticket weight.