码迷,mamicode.com
首页 > 系统相关 > 详细

Eclipse设置代码模板Code Template

时间:2019-05-31 01:33:47      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:desc   win   type   mini   user   version   nis   reserve   tag   

  • 团队协作最好是使用相同的代码模板 Code Template,打开 Window -> Preference -> Java -> Code Style -> Code Template,然后展开 Comments 节点下的 Types 进行编辑(一般需要编辑该 Java 类的代码模板)。
  • 编辑 Code Template 如下
/**
 * @Description: ${todo}(这里用一句话描述这个类的作用)
 * @author ${user}
 * @since JDK 1.8
 * @version V1.0
 * Date:${date} ${time}
 * Copyright (c) ${year}, 89757@qq.com All Rights Reserved. 
 * ${tags}
 */
  • 修改后的 Code Template 如下
/**
 * Hello World
 * @author Administrator
 * @since JDK 1.8
 * @version V1.0
 * Date:2019年5月30日 下午11:11:11
 * Copyright (c) 2019, 89757@qq.com All Rights Reserved.
 */
public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

Eclipse设置代码模板Code Template

标签:desc   win   type   mini   user   version   nis   reserve   tag   

原文地址:https://www.cnblogs.com/wumz/p/10952758.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!