Execute Live Template from code
Hi
How do I execute a Live Template from code?
I want something like (psuedo):
string liveTemplateName = "templateName";
Dictionary<string, string> parameters = { "variableName", "variableValue" }
LiveTemplateManager.Execute(liveTemplateName, parameters);
This will start the Live Template at the current cursor position. If there
is a variable named "variableName", it should have the value "variableValue".
Otherwise it should work as a normale Live Template.
Thanks.
--Jakob
Please sign in to leave a comment.
Hello Jakob,
Yes, there is a family of methods in the LiveTemplatesController shell
component.
WBR,
Oleg Stepanov
Senior Whiteboard Operator
JetBrains, Inc.
"Develop with pleasure!"
mailto:oleg.stepanov@jetbrains.com
Hello Oleg,
Thanks.
--Jakob
>> Hi
>>
>> How do I execute a Live Template from code?
>>
>> I want something like (psuedo):
>>
>> string liveTemplateName = "templateName"; Dictionary<string, string>
>> parameters = { "variableName", "variableValue" }
>> LiveTemplateManager.Execute(liveTemplateName, parameters);
>>
>> This will start the Live Template at the current cursor position. If
>> there is a variable named "variableName", it should have the value
>> "variableValue". Otherwise it should work as a normale Live Template.
>>
>> Thanks.
>>
>> --Jakob
>>