Invoking a Live Template programmatically
已回答
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.
请先登录再写评论。
Please use TemplateManager#startTemplate
Thanks :) Now I just need to find out where to get a handle to the Template I'd like to use.
If it's a template that you see in Live Template settings, then you can find it in TemplateSettings.getInstance().getTemplate(...)
Perfect :)