I'm trying to make a live template for creating a variable. I don't like
Introduce Variable refactoring much because the dialog gets in my way. I
created the template:
$TYPE$ $NAME$ = $VAL$;
The variables are:
Name | Expression | Default value
$VAL$ | |
$TYPE$ | rightSideType() | java.lang.Object
$NAME$ | suggestVariableName() | var
This looks fine to me. I expect it to start out with:
Object var = |;
then I type the expression and hit Enter, and it becomes:
String |var| = ""; // the || represents selection
then I type a variable name, and I hit enter, and it's done:
String str = "";
However, instead, it doesn't suggest anything, and no defaults are used.
So it starts out:
and I type an expression:
| = "";
and so on, without any completion or inference.
Does someone know what I'm doing wrong, or how to fix this live template
to do what I want it to do?