| <?xml version="1.0" encoding="UTF-8"?> |
| <templateSet group="other"> |
| <template resource-bundle="messages.CodeInsightBundle" key="livetemplate.description.inst" |
| name="inst" toReformat="true" toShortenFQNames="true" value="if ($EXPR$ instanceof $TYPE$) { $TYPE$ $VAR1$ = ($TYPE$)$EXPR$; $END$ }"> |
| <variable alwaysStopAt="true" defaultValue="expr" expression="variableOfType("Object")" name="EXPR" /> |
| <variable alwaysStopAt="true" defaultValue="" expression=""Object"" name="TYPE" /> |
| <variable alwaysStopAt="true" defaultValue="" expression="suggestVariableName()" name="VAR1" /> |
| <context> |
| <option name="JAVA_CODE" value="false" /> |
| <option name="JAVA_STATEMENT" value="true" /> |
| <option name="GROOVY" value="false" /> |
| <option name="GROOVY_STATEMENT" value="true" /> |
| </context> |
| </template> |
| <template resource-bundle="messages.CodeInsightBundle" key="livetemplate.description.lst" |
| name="lst" toReformat="true" toShortenFQNames="true" value="$ARRAY$[$ARRAY$.length - 1]"> |
| <variable alwaysStopAt="true" defaultValue="array" expression="arrayVariable()" name="ARRAY" /> |
| <context> |
| <option name="JAVA_CODE" value="false" /> |
| <option name="JAVA_EXPRESSION" value="true" /> |
| <option name="GROOVY" value="false" /> |
| <option name="GROOVY_EXPRESSION" value="true" /> |
| </context> |
| </template> |
| <template resource-bundle="messages.CodeInsightBundle" key="livetemplate.description.mn" |
| name="mn" toReformat="true" toShortenFQNames="true" value="$VAR$ = Math.min($VAR$, $END$);"> |
| <variable alwaysStopAt="true" defaultValue="" expression="variableOfType("double")" name="VAR" /> |
| <context> |
| <option name="JAVA_CODE" value="false" /> |
| <option name="JAVA_STATEMENT" value="true" /> |
| <option name="GROOVY" value="false" /> |
| <option name="GROOVY_STATEMENT" value="true" /> |
| </context> |
| </template> |
| <template resource-bundle="messages.CodeInsightBundle" key="livetemplate.description.mx" |
| name="mx" toReformat="true" toShortenFQNames="true" value="$VAR$ = Math.max($VAR$, $END$);"> |
| <variable alwaysStopAt="true" defaultValue="" expression="variableOfType("double")" name="VAR" /> |
| <context> |
| <option name="JAVA_CODE" value="false" /> |
| <option name="JAVA_STATEMENT" value="true" /> |
| <option name="GROOVY" value="false" /> |
| <option name="GROOVY_STATEMENT" value="true" /> |
| </context> |
| </template> |
| <template resource-bundle="messages.CodeInsightBundle" key="livetemplate.description.psvm" |
| name="psvm" toReformat="true" toShortenFQNames="true" value="public static void main(String[] args){ $END$ }"> |
| <context> |
| <option name="JAVA_CODE" value="false" /> |
| <option name="JAVA_DECLARATION" value="true" /> |
| <option name="GROOVY" value="false" /> |
| <option name="GROOVY_DECLARATION" value="true" /> |
| </context> |
| </template> |
| <template resource-bundle="messages.CodeInsightBundle" key="livetemplate.description.toar" |
| name="toar" toReformat="true" toShortenFQNames="true" value="$COLLECTION$.toArray(new $COMPONENT_TYPE$[$COLLECTION$.size()])$END$"> |
| <variable alwaysStopAt="true" defaultValue=""Object"" expression="componentTypeOf(expectedType())" name="COMPONENT_TYPE" /> |
| <variable alwaysStopAt="true" defaultValue="collection" expression="variableOfType("java.util.Collection")" name="COLLECTION" /> |
| <context> |
| <option name="JAVA_CODE" value="false" /> |
| <option name="JAVA_EXPRESSION" value="true" /> |
| </context> |
| </template> |
| <template resource-bundle="messages.CodeInsightBundle" key="livetemplate.description.lazy" |
| name="lazy" value="if ($VAR$ == null) { $VAR$ = new $TYPE$($END$); }" toReformat="true" toShortenFQNames="true"> |
| <variable name="VAR" expression="variableOfType("java.lang.Object")" defaultValue="" alwaysStopAt="true" /> |
| <variable name="TYPE" expression="subtypes(typeOfVariable(VAR))" defaultValue="" alwaysStopAt="true" /> |
| <context> |
| <option name="JAVA_CODE" value="false" /> |
| <option name="JAVA_STATEMENT" value="true" /> |
| <option name="GROOVY" value="false" /> |
| <option name="GROOVY_STATEMENT" value="true" /> |
| </context> |
| </template> |
| <template resource-bundle="messages.CodeInsightBundle" key="livetemplate.description.if.not.null" |
| name="inn" value="if ($VAR$ != null) { $END$ }" toReformat="true" toShortenFQNames="true"> |
| <variable name="VAR" expression="suggestFirstVariableName("Object")" defaultValue="var" alwaysStopAt="true" /> |
| <context> |
| <option name="JAVA_CODE" value="false" /> |
| <option name="JAVA_STATEMENT" value="true" /> |
| <option name="GROOVY" value="false" /> |
| <option name="GROOVY_STATEMENT" value="true" /> |
| </context> |
| </template> |
| <template resource-bundle="messages.CodeInsightBundle" key="livetemplate.description.if.null" |
| name="ifn" value="if ($VAR$ == null) { $END$ }" toReformat="true" toShortenFQNames="true"> |
| <variable name="VAR" expression="suggestFirstVariableName("Object")" defaultValue="var" alwaysStopAt="true" /> |
| <context> |
| <option name="JAVA_CODE" value="false" /> |
| <option name="JAVA_STATEMENT" value="true" /> |
| <option name="GROOVY" value="false" /> |
| <option name="GROOVY_STATEMENT" value="true" /> |
| </context> |
| </template> |
| <template resource-bundle="messages.CodeInsightBundle" key="livetemplate.description.geti" |
| name="geti" toReformat="true" toShortenFQNames="true" value="public static $CLASS_NAME$ getInstance() { return $VALUE$; }"> |
| <variable name="CLASS_NAME" expression="className" defaultValue="" alwaysStopAt="false"/> |
| <variable name="VALUE" expression="variableOfType(CLASS_NAME)" defaultValue="null" alwaysStopAt="true"/> |
| <context> |
| <option name="JAVA_CODE" value="false" /> |
| <option name="JAVA_DECLARATION" value="true" /> |
| <option name="GROOVY" value="false" /> |
| <option name="GROOVY_DECLARATION" value="true" /> |
| </context> |
| </template> |
| </templateSet> |