【记录】eclipse / STS 设置注释模版格式/导入注释模版格式
设置注释模板的入口:Window->Preference->Java->Code Style->Code Template

将如下保存在新创建的xml文件中,导入进去
<?xml version="1.0"?>
<templates>
<template
autoinsert="false"
context="filecomment_context"
deleted="false"
description="Comment for created Java files"
enabled="true"
id="org.eclipse.jdt.ui.text.codetemplates.filecomment"
name="filecomment">
/**
* @Title: ${file_name}
* @Package ${package_name}
* @Description:
* @author ${user}
* @date ${date}
* @version V1.0
*/</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">
/**
* @ClassName: ${type_name}
* @Description:
* @author ${user}
* @date ${date}
* @version V1.0
* ${tags}
*/</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} :
*/</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">
/**
* 创建一个新的实例 ${enclosing_type}.
*
* ${tags}
*/</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: ${todo}
* @param ${tags}
* @return ${return_type}
* @throws
*/</template>
<template
autoinsert="true"
context="overridecomment_context"
deleted="false"
description="Comment for overriding methods"
enabled="true"
id="org.eclipse.jdt.ui.text.codetemplates.overridecomment"
name="overridecomment">
/* (非 Javadoc)
* <p>Title: ${enclosing_method}</p>
* <p>Description: </p>
* ${tags}
* ${see_to_overridden}
*/</template>
<template
autoinsert="true"
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="false"
context="gettercomment_context"
deleted="false"
description="Comment for getter method"
enabled="true"
id="org.eclipse.jdt.ui.text.codetemplates.gettercomment"
name="gettercomment">
/**
* @return ${bare_field_name}
*/</template>
<template
autoinsert="true"
context="settercomment_context"
deleted="false"
description="Comment for setter method"
enabled="true"
id="org.eclipse.jdt.ui.text.codetemplates.settercomment"
name="settercomment">
/**
* @param ${param} the ${bare_field_name} to set
*/</template>
</templates>
【记录】eclipse / STS 设置注释模版格式/导入注释模版格式的更多相关文章
- Eclipse中设置作者日期等Java注释模板
Eclipse作为JavaIDE(Integrated Development Environment,集成开发环境),可以通过设置自动添加Javadoc注释信息,如@author 作者名.@vers ...
- 在Eclipse中设置Java类上面的注释(包含作者、日期等)
希望在Eclipse中,让Java类上面的注释像下面这样,改如何设置呢? 在Eclipse中,点击菜单中的Window-->Preferences,打开如下窗口:
- 【记录】STS设置maven远程仓库,加快下载jar包
在STS中windows->preferences->maven->user settings 修改user settings里setting.xml配置文件 <?xml ve ...
- Eclipse中设置在创建新类时自动生成注释
方法一:Eclipse中设置在创建新类时自动生成注释 windows-->preference Java-->Code Style-->Code Templates code--&g ...
- eclipse/MyEclipse 日期格式、注释日期格式、时区问题
eclipse/MyEclipse 日期格式.注释日期格式.时区问题 在eclipse/MyEclipse中,如果你的注释或是运行System.out.print(new java.util.Date ...
- Eclipse中设置注释、日期等信息
在使用Eclipse 编写Java代码时,自动生成的注释信息都是按照预先设置好的格式生成的,例如其中author,datetime等属性值. 我们可以在Eclipse 中进行设置自己希望显示的注释信息 ...
- 在Eclipse里设置格式化代码时不格式化注释
在Eclipse里设置格式化代码时不格式化注释 今天格式化代码 发现直接format会把注释也一块格式化了,有时候会把好好的注释弄的很乱.甚为头疼. 查阅之后解决办法如下: Windows -> ...
- spring 源码导入eclipse(sts)
一. 准备工作 1.下载安装sts(springsource推荐使用) 下载地址: http://www.springsource.org/downloads/sts-ggts 2.下载安装gradl ...
- 学习记录 Eclipse常用快捷键及其演练
Eclipse中10个最有用的快捷键组合 1. ctrl+shift+r:打开资源 这可能是所有快捷键组合中最省时间的了.这组快捷键可以让你打开你的工作区中任何一个文件,而你只需要按下文件名或mask ...
随机推荐
- db2缓冲池
CREATE BUFFERPOOL DEMOBP IMMEDIATE SIZE 250 AUTOMATIC PAGESIZE 4 K ; CREATE BUFFERPOOL DEMOBP IMMED ...
- Jquery查找界面Html元素的方法(持续更新)
1. 根据id来获取:$("#id") 2.根据class来获取:$(".class") 3.根据name来获取:$("[name=??]" ...
- JavaScript 中的 this 并不难
js学习笔记 --- this 详解 js中的this,如果没有深入的学习了解,那么this将会是让开发人员很头疼的问题.下面,我就针对this,来做一个学习笔记. 1.调用位置 在理解this的绑定 ...
- 用户Bug修补报告
用户Bug修补报告 虽然经过许多天的奋斗,我们的U-Help已经正式投入使用,不过在使用过程中遇到了大大小小的问题,我们通过努力修补了其中的相当一部分,以下是用户Bug修补报告. 7.31:发布bet ...
- 403 ,502 到正确的nginx 配置
配置完一定要reboot ,之前我一直用的 ./nginx -s reload ,这次我不知道为啥不行... 再没有reboot 之前一直在用的旧的配置.所以一直在报403forbbdin. rebo ...
- 三、SpringBoot项目探究
1.pom文件 父项目 <parent> <groupId>org.springframework.boot</groupId> <artifactId> ...
- Session的load和get方法区别是什么?
①如果没有找到符合条件的记录,get方法返回null值,而load方法会抛出异常: ②get方法直接返回实体类对象,load方法返回实体类对象的代理: ③在Hibernate3之前,get方法只在一级 ...
- python3 实现堡垒机功能(并发执行命令及上传下载文件)
转载请注明出处,欢迎提出宝贵意见,谢谢! 功能介绍: 1.主机分组 登录后显示分组主机及主机数量 选择主机组后显示该主机组下所有主机信息,主机名及IP显示输入选择:1.执行命令利用线程并发组内所有主机 ...
- 【leetcode】996. Number of Squareful Arrays
题目如下: Given an array A of non-negative integers, the array is squareful if for every pair of adjacen ...
- 【leetcode】986. Interval List Intersections
题目如下: Given two lists of closed intervals, each list of intervals is pairwise disjoint and in sorted ...