Created
February 2, 2015 17:01
-
-
Save jmfayard/d7c0f5ac1b784272a7ce to your computer and use it in GitHub Desktop.
intellij14 live templates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<templateSet group="jmfayard"> | |
<template name="key" value="private static final String KEY_$value$ = "$value$";" description="Key for a bundle" toReformat="false" toShortenFQNames="true"> | |
<variable name="value" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="JAVA_DECLARATION" value="true" /> | |
</context> | |
</template> | |
<template name="logd" value="private final org.apache.log4j.Logger _log = org.apache.log4j.Logger.getLogger("$class$");" description="Declaration with log4j" toReformat="true" toShortenFQNames="true"> | |
<variable name="class" expression="className()" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="JAVA_DECLARATION" value="true" /> | |
</context> | |
</template> | |
<template name="logm" value="_log.info("$class$ > $method$"); _log.info("Params: " + $params$);" description="log the current function" toReformat="true" toShortenFQNames="true"> | |
<variable name="class" expression="className()" defaultValue="" alwaysStopAt="false" /> | |
<variable name="method" expression="methodName()" defaultValue="" alwaysStopAt="false" /> | |
<variable name="params" expression="groovyScript("'\"' + _1.collect { it + ' = [\" + ' + it + ' + \"]'}.join(', ') + '\"'", methodParameters()) " defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="JAVA_EXPRESSION" value="true" /> | |
</context> | |
</template> | |
<template name="logr" value="_log.info("Result: " + $result$);" description="log the result of the current function" toReformat="true" toShortenFQNames="true"> | |
<variable name="result" expression="" defaultValue="result" alwaysStopAt="true" /> | |
<context> | |
<option name="JAVA_EXPRESSION" value="true" /> | |
</context> | |
</template> | |
</templateSet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment