Live Templates

I'm trying to determine if I can create a selection list for a variable in a live template. It looks like you can define a default value for a variable, but not a selection list that you can pick from when invoking the template in the editor.

Grant

2 comments

Hello Grant,

You need to use the "Expression" field of the "Edit Live Template" dialog,
to make IDEA suggest you possible values.
Press "Help" in the "Edit Template Variable" dialog and read the list of
available expressions with description.
You can also look how the built-in templates with similar functionality are
defined. The best explanation is a good example :)

Ann Oreshnikova.


"Grant Lewis" <jiveadmin@intellij.net> wrote in message
news:26820494.1049744198576.JavaMail.jrun@is.intellij.net...

I'm trying to determine if I can create a selection list for a variable in

a live template. It looks like you can define a default value for a
variable, but not a selection list that you can pick from when invoking the
template in the editor.
>

Grant



0

I looked at those, but none of the built-in expressions appear to do what I want. My goal is to create an enumeration for an XML variable and have the enumeration displayed when invoking the template in the editor.

Grant

0

Please sign in to leave a comment.