Invoking a Live Template programmatically

Answered

Hi there,

I am designing a plug-in and I need to invoke a live template from code. How would you do this programmatically? I already registered a custom action and I would like to invoke the live template from the actionPerformed() callback. 

Thank you.

5 comments
Comment actions Permalink
Official comment

Please use TemplateManager#startTemplate

Comment actions Permalink

Thanks :) Now I just need to find out where to get a handle to the Template I'd like to use.

0
Comment actions Permalink

If it's a template that you see in Live Template settings, then you can find it in TemplateSettings.getInstance().getTemplate(...)

0

Please sign in to leave a comment.