噫,这个功能真的好用。

Windows->Preference->Java->Editor->Templates

Eclipse的代码模板

new一个(我这个是edit)

Eclipse的代码模板

name是源字符,pattern是结果字符。

模板变量 ${ 就了有提示,Help->helpcontents也有介绍,搜索Java Editor Template Variables。

相关文章: