Pull up catch block to end of try bracket
I have scoured the Global Code Style settings and can't find any option to set that makes IntelliJ automatically move a catch block up to the same line as the end try bracket.
For example:
try {
//some code
}
catch (Exception e) {
}
I want IntelliJ to move the catch up onto the same line as the bracket when I do a ctrl-alt-L code reformat. It will do this for if/while/etc but not for try/catch. This is what I want IntelliJ to change it to:
try {
//some code
} catch (Exception e) {
}
Is there some option I am missing?
请先登录再写评论。
Keyboard style :
1 - Ctrl Alt S
2 - Alt S
3 - Type 'Catch on new line'
4 - Press 7 times arrow down
5 - Enter
Gilles
Checking that box causes it to be put on a new line...I don't want it on a new line.
That box is unchecked, IntelliJ doesn't seem to honor that setting when doing a code reformat (ctrl-alt-L)