Is there a way to use an environment variable in a live template script path?
Answered
Hi,
All my live template scripts share the same path, like this:
groovyScript("/Users/me/Dropbox/dev/intellij/live_templates/print_method_name_and_parameters_and_values.groovy", methodName(), methodParameters())
Is there a way to set the path (i.e. "/Users/me/Dropbox/dev/intellij/live_templates/") using an environment variable or something?
Thanks.
Julian
Please sign in to leave a comment.
No, there is no such built-in way. But you can make the first argument of groovyScript (i.e. path) yet another groovyScript that returns a string value from the current environment.
That's a great suggestion! Thanks.