Live Templates, is it possible to overload it for different scopes?

Answered

In Android Studio I have the logt live template

private static final String TAG = $className$.class.getSimpleName();

However it is totally different in Kotlin

private val TAG = $className$::class.simpleName

However afaik, I can't set two templates with the same abbreviation even if their scopes are disjunct. And I couldn't find anyway that I can use an if-statement in live templates, such as

$if Java.Statement$
private static final String TAG = $className$.class.getSimpleName();
$endif$
$if Kotlin.Statement$
private val TAG = $className$::class.simpleName
$endif$

So is it possible to have an abbreviation which works in all the different environments? Thanks.

Please sign in to leave a comment.