IDEA编码配置

223 阅读1分钟

File and Code Templates -> Includes

ZaelotIDE_file_comment

/** * Zaelot.com Inc. * Copyright (c) 2016-${YEAR} All Rights Reserved. */

ZaelotIDE_file_header

/** * * @author ${USER} * @version $Id: ${NAME}.java, v 0.1 ${YEAR}${MONTH}${DAY}${TIME} ${USER} Exp $ */    


File and Code Templates -> Files

Class

#parse("ZaelotIDE_file_comment.java")#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end#parse("ZaelotIDE_file_header.java")public class ${NAME} {}

Interface

#parse("ZaelotIDE_file_comment.java")#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end#parse("ZaelotIDE_file_header.java")public interface ${NAME} {}

Enum

#parse("ZaelotIDE_file_comment.java")#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end#parse("ZaelotIDE_file_header.java")public enum ${NAME} {}

AnnotationType

parse("ZaelotIDE_file_comment.java")#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end#parse("ZaelotIDE_file_header.java")public @interface ${NAME} {}


类的get/set方法

ZaelotIDE_setter

/*** Setter method for property <tt>$field.name</tt>.** @param $field.name  value to be assigned to property $field.name*/#set($paramName = $helper.getParamName($field, $project))#if($field.modifierStatic)static ###endvoid set$StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project)))($field.type $paramName) {#if ($field.name == $paramName)    #if (!$field.modifierStatic)    this.##    #else        $classname.##    #end#end$field.name = $paramName;}

ZaelotIDE_getter

/*** Getter method for property <tt>$field.name</tt>.** @return property value of $field.name*/#if($field.modifierStatic)static ###end$field.type ###set($name = $StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project))))#if ($field.boolean && $field.primitive)is###elseget###end${name}() {return $field.name;}