| <?xml version="1.0" encoding="UTF-8"?> |
| <templateSet group="AndroidLog"> |
| <template name="logd" value="android.util.Log.d(TAG, "$METHOD_NAME$: $content$");" description="Log.d(TAG, String)" toReformat="true" toShortenFQNames="true"> |
| <variable name="METHOD_NAME" expression="methodName()" defaultValue="" alwaysStopAt="false" /> |
| <variable name="content" expression="" defaultValue="" alwaysStopAt="true" /> |
| <context> |
| <option name="JAVA_STATEMENT" value="true" /> |
| </context> |
| </template> |
| <template name="loge" value="android.util.Log.e(TAG, "$METHOD_NAME$: $content$", $exception$);" description="Log.e(TAG, String, Exception)" toReformat="true" toShortenFQNames="true"> |
| <variable name="METHOD_NAME" expression="methodName()" defaultValue="" alwaysStopAt="false" /> |
| <variable name="content" expression="" defaultValue="" alwaysStopAt="true" /> |
| <variable name="exception" expression="" defaultValue="e" alwaysStopAt="false" /> |
| <context> |
| <option name="JAVA_STATEMENT" value="true" /> |
| </context> |
| </template> |
| <template name="logi" value="android.util.Log.i(TAG, "$METHOD_NAME$: $content$");" description="Log.i(TAG, String)" toReformat="true" toShortenFQNames="true"> |
| <variable name="METHOD_NAME" expression="methodName()" defaultValue="" alwaysStopAt="false" /> |
| <variable name="content" expression="" defaultValue="" alwaysStopAt="true" /> |
| <context> |
| <option name="JAVA_STATEMENT" value="true" /> |
| </context> |
| </template> |
| <template name="logw" value="android.util.Log.w(TAG, "$METHOD_NAME$: $content$", $exception$);" description="Log.w(TAG, String, Exception)" toReformat="true" toShortenFQNames="true"> |
| <variable name="METHOD_NAME" expression="methodName()" defaultValue="" alwaysStopAt="false" /> |
| <variable name="content" expression="" defaultValue="" alwaysStopAt="true" /> |
| <variable name="exception" expression="" defaultValue="e" alwaysStopAt="false" /> |
| <context> |
| <option name="JAVA_STATEMENT" value="true" /> |
| </context> |
| </template> |
| <template name="wtf" value="android.util.Log.wtf(TAG, "$METHOD_NAME$: $content$", $exception$);" description="Log.wtf(TAG, String, Exception)" toReformat="true" toShortenFQNames="true"> |
| <variable name="METHOD_NAME" expression="methodName()" defaultValue="" alwaysStopAt="false" /> |
| <variable name="content" expression="" defaultValue="" alwaysStopAt="true" /> |
| <variable name="exception" expression="" defaultValue="e" alwaysStopAt="false" /> |
| <context> |
| <option name="JAVA_STATEMENT" value="true" /> |
| </context> |
| </template> |
| <template name="logt" value="private static final String TAG = "$className$";" description="A static logtag with your current classname" toReformat="true" toShortenFQNames="true"> |
| <variable name="className" expression="groovyScript("_1.take(Math.min(23, _1.length()));", className())" defaultValue="" alwaysStopAt="true" /> |
| <context> |
| <option name="JAVA_DECLARATION" value="true" /> |
| </context> |
| </template> |
| <template name="logm" value="android.util.Log.d(TAG, $content$);" description="Log method name and its arguments" toReformat="true" toShortenFQNames="true"> |
| <variable name="content" expression="groovyScript("def params = _2.collect {it + ' = [\" + ' + it + ' + \"]'}.join(', '); return '\"' + _1 + '() called' + (params.empty ? '' : ' with: ' + params) + '\"'", methodName(), methodParameters())" defaultValue="" alwaysStopAt="false" /> |
| <context> |
| <option name="JAVA_STATEMENT" value="true" /> |
| </context> |
| </template> |
| <template name="logr" value="android.util.Log.d(TAG, "$METHOD_NAME$() returned: " + $result$);" description="Log result of this method" toReformat="true" toShortenFQNames="true"> |
| <variable name="METHOD_NAME" expression="methodName()" defaultValue="" alwaysStopAt="false" /> |
| <variable name="result" expression="variableOfType(methodReturnType())" defaultValue="" alwaysStopAt="true" /> |
| <context> |
| <option name="JAVA_STATEMENT" value="true" /> |
| </context> |
| </template> |
| </templateSet> |
| |