我正在尝试设置 Eclipse,以便它格式化 try catch finally 块(按下时CTRL+SHIFT+F如下:
try
{
// some code
}
catch (IOException exception)
{
// some exception handling code
}
finally
{
// some more code
}
Run Code Online (Sandbox Code Playgroud)
我在 Window >> Preferences >> Java >> Code Style >> Formatter 下找到了格式化选项并添加了一个新的 Active 配置文件,但是我在大括号选项卡上看不到 try catch 块的选项。我已将该选项卡上的所有内容都设置为“下一行”,但是代码现在的格式为:
try
{
// some code
} catch (IOException exception)
{
// some exception handling code
} finally
{
// some more code
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4206 次 |
| 最近记录: |