LIVE TEMPLATE PROBLEM VARIABLES NEXT TO EACH OTHER

Please help me with this Live Template problem.

// template with variables next to each other

 enfType(nameClass_,0/*LINE*/,'$VAR$',$VAR$,$NS$$TP$,'$NS$.$TP$'$END$);

for VAR, I type "re"

for NS, I type "core"

for TP, I type "Regex"

I get the following:

    enfType(nameClass_,0/*LINE*/,'re',re,coreRegex,'coreRegex.Regex');

As you can see, the second occurrence of $NS$ is resolved as "coreRegex" when it should be "core".

I was expecting the following:

    enfType(nameClass_,0/*LINE*/,'re',re,coreRegex,'core.Regex');

Can someone tell me what I'm doing wrong?

Thank you in advance for you help with this problem.  :-)

 

 

2 comments

Hi there,

Having the same here. Consider submitting a bug to the Issue Tracker at https://youtrack.jetbrains.com/issues/WEB 

Possible (working) workaround:

enfType(nameClass_,0/*LINE*/,'$VAR$',$VAR$,$NS2$$TP2$,'$NS$.$TP$'$END$);

Then do some small modifications on "Edit variables" screen (provide default values + change the order) - just like on screenshot:

 

0

Excellent, Andriy, That worked.  I logged a bug.  Thank you for the quick response. :-)

0

Please sign in to leave a comment.