In my project, I have many serialization classes and, to make the classes more readable, I'm standardizing them, with an argument which has the same name of the $class$
, that is $argName$
:
@immutable
class $class$_Serialize extends Serialize<$class$> {
final $class$ $argName$;
$class$_Serialize(this.$argName$);
@override
Map<String, Object> run() => $serialize$
}
In the Live Template above, the annoyance is that I have to retype $argName$
instead of the template simply decapitalizing $class$
. How would I tie $argName$
to the decapitalization of $class$
in IntelliJ?
I've already tried to mess around with editing the variables and adding the decaptialize()
function in the expression column, but so far haven't had much success. It was something like this:
question from:
https://stackoverflow.com/questions/65852123/how-to-decapitalize-an-argument-in-a-live-template-in-intellij 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…