idea 实用 Live Template。
soutv
System.out.println("$EXPR_COPY$ = " + $EXPR$);
Name | Expression | Default Value | Skip if defined |
---|
EXPR | variableOfType("") | “expr” | | EXPR_COPY | escapeString(EXPR) | | √ |
ifn
if ($VAR$ == null) {
$END$
}
Name | Expression | Default Value | Skip if defined |
---|
VAR | suggestFirstVariableName(“Object”) | var | |
inn
if ($VAR$ != null) {
$END$
}
Name | Expression | Default Value | Skip if defined |
---|
VAR | suggestFirstVariableName(“Object”) | var | |
soutm
applicable in Java: statement.
System.out.println($CLASS_NAME$.$METHOD_NAME$);
Name | Expression | Default Value | Skip if defined |
---|
CLASS_NAME | className() | | √ | METHOD_NAME | methodName() | | √ |
ife
if (ColletionUtils.isEmpty($VAR$)) {
$END$
}
Name | Expression | Default Value | Skip if defined |
---|
VAR | suggestFirstVariableName(“Object”) | var | |
ifne
if (!ColletionUtils.isEmpty($VAR$)) {
$END$
}
Name | Expression | Default Value | Skip if defined |
---|
VAR | suggestFirstVariableName(“Object”) | var | |
ifsb
if (StringUtils.isBlank($VAR$)) {
$END$
}
Name | Expression | Default Value | Skip if defined |
---|
VAR | suggestFirstVariableName(“Object”) | var | |
ifnsb
if (StringUtils.isNotBlank($VAR$)) {
$END$
}
Name | Expression | Default Value | Skip if defined |
---|
VAR | suggestFirstVariableName(“Object”) | var | |
logInfo
log.info(" ~ $CLASS_NAME$ ~ $METHOD_NAME$; ~ $EXPR_COPY$ ~ {}" + "\r\n ~ $METHOD_PARAMETERS$",
$EXPR$, $END$$METHOD_PARAMETERS$);
Name | Expression | Default Value | Skip if defined |
---|
CLASS_NAME | className() | | | METHOD_NAME | methodName() | | | EXPR_COPY | escapeString(EXPR) | | √ | METHOD_PARAMETERS | methodParameters() | | | EXPR | variableOfType("") | “expr” | |
logerror
log.info("logError ~ $CLASS_NAME$ ~ $METHOD_NAME$; ~ e ~ {}" + "\r\n ~ $METHOD_PARAMETERS$",
e, $METHOD_PARAMETERS$, e);
Name | Expression | Default Value | Skip if defined |
---|
CLASS_NAME | className() | | | METHOD_NAME | methodName() | | | METHOD_PARAMETERS | methodParameters() | | |
|