Reputation: 7294
In Live Templates we can define our own variables. And when creating expression from our live template, cursor "jumps" to the place, where our variable is used, highlighting that place with red borders.
private function $NAME$($ARGS$):$RETURN_TYPE$ {
$END$
}
Here: $NAME$
, $ARGS$
, and $RETURN_TYPE$
.
Can I define such variable and places in File > Templates? I believe I could because MXML components are created in such a way through file templates.
I looked up MXML Component file templates, but there is just a ${Parent_component}
variable there. But when I try to define such variables, then I'm expected to set their values at text inputs before creating file from template.
Upvotes: 1
Views: 504
Reputation: 678
Yes but it doesn't work the exact same way. You can add your own variables to your file templates such as: ${MY_VARIABLE}
Then when you use the template, a dialog will popup and ask you to supply the value for MY_VARIABLE.
Upvotes: 1