Hook on Live Template generation

Answered

Hello,

I am working on a plugin and want to track usage statistics for a live template in the plugin.  The live template is generating code as expected, but I want to call additional code on generation to ping our server.  Is there a hook to call custom code when a live template is generated by a user?

 

Thank you

2 comments
Comment actions Permalink

You can implement a "dummy" com.intellij.codeInsight.template.impl.TemplateOptionalProcessor, see com.intellij.codeInsight.template.impl.CodeBlockReformattingProcessor as base.

PS: Please note that collecting/sending such statistics which may exhibit personal data requires explicit consent from users.

0
Comment actions Permalink

Thank you for your quick response!

0

Please sign in to leave a comment.