Live Templates
0. 打开live templates
settings-> Live Templates-> 点击加号 -> 选择Live Template
1. try catch块儿
try {
} catch (Exception e) {
e.printStackTrace();
} finally {
}
Postfix Completion
0.打开位置
1. 打开 Settings(Ctrl+Alt+S
或Cmd+,
)
2. 导航到Editor
→ General
→ Postfix Completion,如图:
3. 点击加号,选择java:
1. 集合的null和emply判断
if($EXPR$ == null || $EXPR$.isEmpty()){
$END$
}