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
*/
效果:
1package com.test; 2 3import java.io.IOException; 4 5/** 6 * 7 * @Description: 8 * @date 2016-6-3 上午11:23:00 9 * @author liyuhao 10 * @Copyright 北京飞利信科技股份有限公司 版权所有 Copyright©2016-2020 11 */ 12public class TempTest {
(2)Comments-->Methods(Java方法注释)
模板:
/**
* @Description:
${tags}
*/
效果如下:
1/** 2 * 3 * @Description: 4 */ 5 public static void getName() { 6 } 7 8 /** 9 * 10 * @Description: 11 * @return 12 * @throws IOException 13 */ 14 public String getName1() throws IOException { 15 return null; 16 } 17 18 /** 19 * 20 * @Description: 21 * @param id 22 * @return 23 */ 24 public static String getName2(String id) { 25 return null; 26 } 27 28 /** 29 * 30 * @Description: 31 * @param id 32 * @param sex 33 * @return 34 * @throws IllegalArgumentException 35 */ 36 public static String getName3(String id, char sex) throws IllegalArgumentException { 37 return null; 38 }