常用快捷键
- ctr+shift+insert 调出剪切板
- alt+insert 调出快速构建bean方法、重构方法等
- Ctrl+Alt+] 切换窗口
- ctr+e 最近打开的文件列表
- ctr+shift+e 最近编辑过的文件列表
- alt+1 切换编辑器与左侧区
类注释模版
有两种方式,第一种默认不提示输入类描述信息,第二种每次创建都会弹出输入框强制要求输入类描述信息
需要注意的是,第二种,需要对类、枚举、注解分别设置。
- Setting->editor->File and Code Templates->Includes:File Header->
/**
* @author chenzy
* @since ${DATE}
**/
- Setting->editor->File and Code Templates->Files: Class->
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
/**
* @author chenzy
* @since ${DATE}
* ${description}
**/
public class ${NAME} {
}
set方法返回this
参考https://blog.csdn.net/weixin_39606236/article/details/86476299
- alt+insert 选择 Getter and Setter
- Setter template
#set($paramName = $helper.getParamName($field, $project))
#if($field.modifierStatic)
static ##
#end
$classname 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;
return this;
}