-
create a live template (I use logf for log function)
-
fill template text with
android.util.Log.i("$tag$", "$content$")
- click edit variables and type in expression for the variables
tag :
groovyScript("_1 ?: '<top>'", kotlinClassName())
content :
groovyScript("def name = _1;def params = _2.collect {it + ' = [$' + it + ']'}.join(', ');return name + '() called' + (params.empty ? '' : ' with: ' + params)", kotlinFunctionName(),functionParameters())
-
check "Skip if defined" for all variables
-
click Define next to "No applicable contexts" and check
Kotlin - Statement