Scripting in the File Templates

Answered

I created issue some time ago: http://stackoverflow.com/questions/33068742/adding-remote-git-link-to-file-header-intellij-idea

I remembered about it, and with much more knowledge of how programming works, I returned to this question.

I checked Android Studio settings and found, that it's possible to use Live Templates in the File Templates.

There is a predefined function in the Live Templates: groovyScript("groovy code")

If it's possible to call to any script in the File Templates, please help me and tell how.

0
4 comments

Hi!

There is a list of predefined functions to use in live templates:

https://www.jetbrains.com/help/idea/2016.3/live-template-variables.html#predefined_functions

0
Avatar
Permanently deleted user

Yeah, I know, I mentioned one of them. I tried to use but without any success. Can you post a working piece of code, I can rely on

0

You can use only pre-defined variables in Live Templates inside File Templates. Please check similar thread https://intellij-support.jetbrains.com/hc/en-us/community/posts/206816669 and Enable Live Templates option in a Web Help and examples of their usage.

0
Avatar
Permanently deleted user

Thanks for the answer

0

Please sign in to leave a comment.