在编写完代码后使用代码格式化程序对代码进行格式化有利于版本沖突时进行对比和文件合并想到当前代码编写格式多少有些太个性化如果可以创建一份代码模板将之导入到所有人的工具中然后所有的代码在编写后都进行格式化则避免了代码格式太混乱的情况有利于大家阅读代码
Comments
Files
/**
* Copyright (C) aumy ${year}
*/
Getters
/**
* @return Returns the ${bare_field_name}
*/
Setters
/**
* @param ${param} The ${bare_field_name} to set
*/
Constructors
/**
* ${tags}
*/
Types
/**
*
* @author aumy() in ${date}
* @since
*
* ${tags}
*/
Fields
/**
*
*/
Methods
/**
* ${tags}
* @since
*/
Overriding methods
/* (nonJavadoc)
* ${see_to_overridden}
*/
代码
New Java files
/**
* Copyright (C) aumy ${year}
*/
${package_declaration}
/**
*
* @author aumy() in ${date}
* @since
*/
${typecomment}
${type_declaration}
Catch block body
// ${todo} Autogenerated catch block
${exception_var}printStackTrace();
Method budy
// ${todo} Autogenerated method stub
${body_statement}
Constructor body
${body_statement}
// ${todo} Autogenerated constructor stub
Getter body
return ${field};
Setter body
${field} = ${param};