具体怎么用:
将下面的内容拷贝出来保存为XML文件,进入,Eclipse :Window --> Java --> Code Style --> Code Templates->Comments->Import 就行了。
在上张图吧:
导入之后在试一下Alt+Shift+J试试吧。
<?xml version="1.0" encoding="UTF-8" standalone="no"?>/** * @return the ${bare_field_name} *//** * @param ${param} the ${bare_field_name} to set *//** * <p>Title: </p> * <p>Description: </p> * ${tags} *//** * @Title: ${file_name} * @Package ${package_name} * @Description: ${todo} * @author 吉桂昕 * @date ${date} ${time} * @version V1.0 *//** * * Project Name:${project_name} * Class Name:${type_name} * Class Desc: * Creator:吉桂昕 * Create Time:${date} ${time} * Modifier: * Modify Time:${date} ${time} * Remark: * @version * *//** * @Fields ${field} : ${todo} *//** * @Title: ${enclosing_method} * @Description: * ${tags} * @return ${return_type} * @throws *//* (非 Javadoc) * <p>Title: ${enclosing_method}</p> * <p>Description: </p> * ${tags} * ${see_to_overridden} *//** * ${tags} * ${see_to_target} */${filecomment} ${package_declaration} ${typecomment} ${type_declaration} // ${todo} Auto-generated catch block ${exception_var}.printStackTrace();// ${todo} Auto-generated method stub ${body_statement}${body_statement} // ${todo} Auto-generated constructor stubreturn ${field};${field} = ${param};