Eclipse 导入注释模板,并使用

ref:https://www.jianshu.com/p/98f818f0ef73

一. 导入注释模板

注释模版 : 操作步骤:打开Window->Preferences->Java->Code Style->Code Templates

如图:
Eclipse 导入注释模板,并使用_第1张图片

点击“Import”,导入模板codetemplates.xml文件。

Eclipse 导入注释模板,并使用_第2张图片


导入以后,也可以在此基础上进行修改


 二. 在程序中使用comment模板

在你需要添加注释的地方点击Sources->Ganarate Element Comment,或者使用快捷键 Alt+Shift+J ,则 eclipse 自动在该类前面添加注释。
Eclipse 导入注释模板,并使用_第3张图片method comment


Eclipse 导入注释模板,并使用_第4张图片  constructor comment

你可能感兴趣的:(Eclipse 导入注释模板,并使用)