“用try ... catch包装"在IntelliJ中? [英] "Wrap with try...catch" in IntelliJ?

查看:64
本文介绍了“用try ... catch包装"在IntelliJ中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以选择一个代码块并让IntelliJ用"try ... catch"包装它吗?

Can I select a block of code and have IntelliJ wrap it with a "try...catch" ?

有键盘快捷键吗?

推荐答案

选择代码,然后选择:

  • 选择Code> Surround With
  • 按Ctrl-Alt-T. (适用于OS X的Command-Option-T.)
  • Choose Code > Surround With
  • Press Ctrl-Alt-T. (Command-Option-T for OS X.)

我想查看生产力指南不时的帮助"菜单.它不仅告诉我所有的快捷方式,而且还跟踪我使用每个快捷键的次数以及上次使用的时间.我可以看到我对这些快捷方式的利用程度.

I like to check the Productivity Guide under the Help menu from time to time. Not only does it tell me all the shortcuts, but it keeps track of how many times I've used each one and when I last used it. I can see how well I'm leveraging the shortcuts.

这篇关于“用try ... catch包装"在IntelliJ中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆