title: How do I create a live template with an expression using another variable?
body: <p>In Intellij IDEA 15.0.3 (build #IU-143.1821)  I'm trying to create a live template which will let me input a JavaScript function name (in camelCase), and create a constant (IN_UPPER_CASE).</p>
  
  <p>For example, when I'm typing the template abbreviation, and then <code>sendUserNameAndPassword</code>, the template should expand to</p>
  
  <pre><code>export const SEND_USERNAME_AND_PASSWORD = 'SEND_USERNAME_AND_PASSWORD';
  
  export function sendUserNameAndPassword() {
  
  }
  </code></pre>
  
  <p>I have created this template:</p>
  
  <pre><code>export const $CONSTANT_NAME$ = '$CONSTANT_NAME$';
  
  export function $FUNCTION_NAME$() {
     $END$
  }
  </code></pre>
  
  <p>and within the <em>Edit variables</em> dialog, I have the following variables:</p>
  
  <pre><code>Name          | Expression                      | Default value | Skip if defined
  FUNCTION_NAME |                                 |               |
  CONSTANT_NAME | capitalizeAndUnderscore(String) |               |        x 
  </code></pre>
  
  <p>Clearly, I would like to have the Expression to be <code>capitalizeAndUnderscore(FUNCTION_NAME)</code> and not <code>capitalizeAndUnderscore(String)</code>, but when I replace <code>String</code> with anything else, the expression is reset to <code>capitalizeAndUnderscore(String)</code> as soon as I move to another field in the dialog.</p>
  
  <p>What am I missing here?</p>