zoukankan      html  css  js  c++  java
  • 整理了一下eclipse 快捷键注释的一份文档

    // 文档名称 codetemplates.xml
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <templates>
    <template autoinsert="false" context="settercomment_context" deleted="false" description="Comment for setter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.settercomment" name="settercomment">
    /** 
     * @param ${param} 要设置的 ${bare_field_name} 
     */ 
    </template>
    <template autoinsert="false" context="constructorcomment_context" deleted="false" description="Comment for created constructors" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name="constructorcomment">
    /** 
     * Desc
     * @param name 
     */ 
    </template>
    <template autoinsert="false" context="typecomment_context" deleted="false" description="Comment for created types" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.typecomment" name="typecomment">
    /**   
     * 
     * @class         : ${type_name}
     * @Package       : ${package_name}
     * @project       : ${project_name}
     * @author        : PC-2016
     * @company       : 
     * @create        : ${date} ${time}
     * @description   : 
     * @version       : v2.0
     */
    </template>
    <template autoinsert="false" context="fieldcomment_context" deleted="false" description="Comment for fields" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name="fieldcomment">
    /**
     * @Fields ${field} : ${todo}(用一句话描述这个变量表示什么)
     */
    </template>
    
    <template autoinsert="false" context="methodcomment_context" deleted="false" description="Comment for non-overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name="methodcomment">
    /**
     * @Title: ${enclosing_method}
     * @Description: 
     * @author add by PC-2016in ${date}
     * ${tags}
     */
    </template>
    <template autoinsert="false" context="overridecomment_context" deleted="false" description="Comment for overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name="overridecomment">
    /* (非 Javadoc) 
     * &lt;p&gt;Title: ${enclosing_method}&lt;/p&gt; 
     * &lt;p&gt;Description: &lt;/p&gt; 
     * ${tags} 
     * ${see_to_overridden} 
     */ 
    </template>
    <template autoinsert="false" context="delegatecomment_context" deleted="false" description="Comment for delegate methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name="delegatecomment">
    /** 
     * ${tags} 
     * ${see_to_target} 
     */ 
    </template>
    <template autoinsert="true" context="newtype_context" deleted="false" description="Newly created files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.newtype" name="newtype">
    ${filecomment}
    ${package_declaration}
    
    ${typecomment}
    ${type_declaration}
    </template>
    <template autoinsert="true" context="classbody_context" deleted="false" description="Code in new class type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.classbody" name="classbody">
    </template>
    <template autoinsert="true" context="interfacebody_context" deleted="false" description="Code in new interface type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name="interfacebody">
    </template>
    <template autoinsert="true" context="enumbody_context" deleted="false" description="Code in new enum type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.enumbody" name="enumbody">
    </template>
    <template autoinsert="true" context="annotationbody_context" deleted="false" description="Code in new annotation type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name="annotationbody">
    </template>
    <template autoinsert="true" context="catchblock_context" deleted="false" description="Code in new catch blocks" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.catchblock" name="catchblock">
    // ${todo} Auto-generated catch block
    ${exception_var}.printStackTrace();
    </template>
    <template autoinsert="true" context="methodbody_context" deleted="false" description="Code in created method stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodbody" name="methodbody">
    // ${todo} Auto-generated method stub
    ${body_statement}
    </template>
    <template autoinsert="true" context="constructorbody_context" deleted="false" description="Code in created constructor stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name="constructorbody">
    ${body_statement}
    // ${todo} Auto-generated constructor stub
    </template>
    <template autoinsert="true" context="getterbody_context" deleted="false" description="Code in created getters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.getterbody" name="getterbody">
    return ${field};
    </template>
    <template autoinsert="true" context="setterbody_context" deleted="false" description="Code in created setters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.setterbody" name="setterbody">
    ${field} = ${param};
    </template>
    </templates>
    /*
     * 导入方式: Window -> Preferences -> Java -> Code Style -> Code Templates,
     * 选中Code,然后选择右侧Import...
     * 够选择下方
     */

    /*
     * 点击Apply 然后点击OK,新建文件,出现你想要的则SUCCESS
     */

    您的资助是我最大的动力!
    金额随意,欢迎来赏!

    如果,您认为阅读这篇博客让您有些收获,不妨点击一下右下角的推荐按钮。
    如果,您希望更容易地发现我的新博客,不妨点击一下绿色通道的关注我

    如果,想给予我更多的鼓励,求打

    欢迎大家关注我的个人博客 Lycos | 小站 !由于最近没时间处理,原域名http://www.liuyuchuan.com暂时停止使用

  • 相关阅读:
    ARM中断(一)
    窗口置顶小工具
    volatile关键字
    IIC总线
    ARM中断(三)
    BootLoader —— S3C2440
    视频那些事
    [轉]簡單的顯示隱藏實現
    Apache Service Monitor Start按鈕变灰 的解决方法
    [转载]经典java转码程序,实现native2ascii命令行的功能
  • 原文地址:https://www.cnblogs.com/yuchuan/p/codetemplates.html
Copyright © 2011-2022 走看看