eclipse注释模板修改
http://swiftlet.net/archives/1199
以下为模板文件
1 <?xml version="1.0" encoding="UTF-8"?> 2 <templates> 3 <template 4 autoinsert="false" 5 context="filecomment_context" 6 deleted="false" 7 description="Comment for created Java files" 8 enabled="true" 9 id="org.eclipse.jdt.ui.text.codetemplates.filecomment" 10 name="filecomment"> 11 /** 12 * @Title: ${file_name} 13 * @Package ${package_name} 14 * @Description: ${todo}(用一句话描述该文件做什么) 15 * @author ${user} 16 * @date ${date} 17 * @version V1.0 18 */ 19 </template> 20 <template 21 autoinsert="false" 22 context="typecomment_context" 23 deleted="false" 24 description="Comment for created types" 25 enabled="true" 26 id="org.eclipse.jdt.ui.text.codetemplates.typecomment" 27 name="typecomment"> 28 /** 29 * @ClassName: ${type_name} 30 * @Description: ${todo}(这里用一句话描述这个类的作用) 31 * @author ${user} 32 * @date ${date} 33 * 34 * ${tags} 35 */ 36 </template> 37 <template 38 autoinsert="false" 39 context="fieldcomment_context" 40 deleted="false" 41 description="Comment for fields" 42 enabled="true" 43 id="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" 44 name="fieldcomment"> 45 /** 46 * @Fields ${field} : ${todo}(用一句话描述这个变量表示什么) 47 */ 48 </template> 49 <template 50 autoinsert="false" 51 context="constructorcomment_context" 52 deleted="false" 53 description="Comment for created constructors" 54 enabled="true" 55 id="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" 56 name="constructorcomment"> 57 /** 58 * 创建一个新的实例 ${enclosing_type}. 59 * 60 * ${tags} 61 */ 62 </template> 63 <template 64 autoinsert="false" 65 context="methodcomment_context" 66 deleted="false" 67 description="Comment for non-overriding methods" 68 enabled="true" 69 id="org.eclipse.jdt.ui.text.codetemplates.methodcomment" 70 name="methodcomment"> 71 /** 72 * @Title: ${enclosing_method} 73 * @Description: ${todo}(这里用一句话描述这个方法的作用) 74 * @param ${tags} 参数 75 * @return ${return_type} 返回类型 76 * @throws 77 */ 78 </template> 79 <template 80 autoinsert="true" 81 context="overridecomment_context" 82 deleted="false" 83 description="Comment for overriding methods" 84 enabled="true" 85 id="org.eclipse.jdt.ui.text.codetemplates.overridecomment" 86 name="overridecomment"> 87 /* (非 Javadoc) 88 * <p>Title: ${enclosing_method}</p> 89 * <p>Description: </p> 90 * ${tags} 91 * ${see_to_overridden} 92 */ 93 </template> 94 <template 95 autoinsert="true" 96 context="delegatecomment_context" 97 deleted="false" 98 description="Comment for delegate methods" 99 enabled="true" 100 id="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" 101 name="delegatecomment"> 102 /** 103 * ${tags} 104 * ${see_to_target} 105 */ 106 </template> 107 <template 108 autoinsert="false" 109 context="gettercomment_context" 110 deleted="false" 111 description="Comment for getter method" 112 enabled="true" 113 id="org.eclipse.jdt.ui.text.codetemplates.gettercomment" 114 name="gettercomment"> 115 /** 116 * @return ${bare_field_name} 117 */ 118 </template> 119 <template 120 autoinsert="true" 121 context="settercomment_context" 122 deleted="false" 123 description="Comment for setter method" 124 enabled="true" 125 id="org.eclipse.jdt.ui.text.codetemplates.settercomment" 126 name="settercomment"> 127 /** 128 * @param ${param} the ${bare_field_name} to set 129 */ 130 </template> 131 </templates>