Eclipse

1、快捷键:

原文地址:http://www.open-open.com/bbs/view/1320934157953  很全!

2、注释模板:

http://chenzhou123520.iteye.com/blog/1625629

http://www.cnblogs.com/wanghuilt/archive/2013/04/08/3007060.html

Window->Preferences->Java->Code Style->Code Templates

(1)Comments-->Types(Java类注释)

模板:

/**
 * @Description: 
 * ${tags}
 * @date ${date} ${time}
 * @author liyuhao
 * @Copyright 北京飞利信科技股份有限公司 版权所有 Copyright©${year}-2020
 */

效果:

package com.test;

import java.io.IOException;

/**
 * 
 * @Description:
 * @date 2016-6-3 上午11:23:00
 * @author liyuhao
 * @Copyright 北京飞利信科技股份有限公司 版权所有 Copyright©2016-2020
 */
public class TempTest {

(2)Comments-->Methods(Java方法注释)

模板:

/**
 * @Description: 
   ${tags}
 */

效果如下:

/**
     * 
     * @Description:
     */
    public static void getName() {
    }

    /**
     * 
     * @Description:
     * @return
     * @throws IOException
     */
    public String getName1() throws IOException {
        return null;
    }

    /**
     * 
     * @Description:
     * @param id
     * @return
     */
    public static String getName2(String id) {
        return null;
    }

    /**
     * 
     * @Description:
     * @param id
     * @param sex
     * @return
     * @throws IllegalArgumentException
     */
    public static String getName3(String id, char sex) throws IllegalArgumentException {
        return null;
    }

评论

暂无评论