IDEA JAVA模板定义

IDEA JAVA模板定义

      • 1、Settings->File and Code Templates
      • 2、Settings->File and Code Templates
      • 3、新建java代码时,填写类注释到弹出的DESCRIPTION框中

IDEA JAVA模板定义

1、Settings->File and Code Templates

Includes标签下
点击加号,添加文件,重命名为:File Header
添加内容为:

 /**
 * 
 * ${DESCRIPTION}
 *
 * @author ${USER}
 * @version 1.0
 * @date ${YEAR}-${MONTH}-${DAY} ${TIME}
 */

2、Settings->File and Code Templates

Files标签下
Class修改为:

/* Copyright © 2020 Yuech and/or its affiliates. All rights reserved. */
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public class ${NAME} {
}

Interface修改为:

/* Copyright © 2020 Yuech and/or its affiliates. All rights reserved. */
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public interface ${NAME} {
}

Enum修改为:

/* Copyright © 2020 Yuech and/or its affiliates. All rights reserved. */
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public @interface ${NAME} {
}

AnnotationType修改为:

/* Copyright © 2020 Yuech and/or its affiliates. All rights reserved. */
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public @interface ${NAME} {
}

3、新建java代码时,填写类注释到弹出的DESCRIPTION框中

你可能感兴趣的:(IDEA JAVA模板定义)