在Eclipse中配置Java模板代码

来源:互联网 发布:php post接口开发 编辑:程序博客网 时间:2024/05/20 06:31

1.例如要在x++处加一个try-finally的代码块


2.右键preference->Java->Editor->Templates ,选择New 


3.插入变量insert variable,其中line_selection表示选中的语句,cursor表示载入代码块后光标的位置


4.在选中的x++上右键surround with ->tryf()



原创粉丝点击