1. project
-
.idea
Project 的配置文件目录 -
.iml
Module 的配置文件 -
indexing...
在给代码创建索引 - IDEA图标介绍
- search: IDEA help
2. Settings
2.1 serialVersionUID
- Editor -> Inspection -> Serializable class without 'serialVersionUID'
2.2 Editor
- File Encoding > UTF-8
- General > Editor Tabs
- Show tabs in one row(No)
- Closing Policy > Tab limit(20)
- General > Appearance > Show whitespaces
Code Style > Java
Code Generation > Line comment at first column(No)
Imports > Class count to use import with '*'
Java-Import.png
2.3 Version Control
- Show directories with changed descendants
- File Status Colors
2.4 Build
- Maven -> Importing -> VM options for importer
-Xmx7068m
Shared Indexes
shared-indexes.png2.5 vmoptions
- Help > Edit Custom VM Options...
- idea64.exe.vmoptions
2.6 修改右键的菜单列表
- File -> Settings -> Appearance & Behavior -> Menus and Toolbar
- Editor Popup Menu 修改在文件内部(即代码行处)打开的右键菜单
- Editor Tab Popup Menu 修改在打开文件的tab页签上右击时修改的右键菜单
- Project View Popup Menu 修改在项目目录里右击文件或文件夹的右键菜单
2.9 JDK 源码 Debug
- Build,Execution,Deployment -> Debugger -> Stepping
2.8 Others
- 屏蔽黄色警告
- 内存设置修改(页面最底部 > Memory Indicator)
- 参数没有注释: Editor -> Inspections -> Javadoc -> Declaration has Javadoc problems
- 变量带下划线
- 代码检测警告提示等级设置
- 形参名提示
3. Code Templates
3.1 class Templates
- Editor > File And Code Templates > Files > Class
/**
* @author Tinyspot
* @date ${YEAR}-${MONTH}-${DAY} ${HOUR}:${MINUTE}
*/
3.2 Method Templates
- Editor > Live Templates
*
*
$params$
* @return
* @throws
* @author Tinyspot
* @date $date$ $time$
*/
注意
- 只有当变量被$$包围 右侧的Edit variables才可以点击
- 模板开头是 * 而不是 /*
- 如果曾经修改过,则显示为 Change 而不是 Define
date: date("yyyy-MM-dd");
time: time("HH:mm")。
params:
groovyScript("def result=''; def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList(); for(i = 0; i < params.size(); i++) {result+='* @param ' + params[i] + ((i < params.size() - 1) ? '\\n ' : '')}; return result", methodParameters())
唯有行动,可破焦虑
网友评论