DefaultLiveTemplatesProvider

Hi,

I've implemented my own DefaultLiveTemplatesProvider, loading a resource from within the plugin. This works really nice.

What I'd like to do now is load some remote resource (from a network share) and add that one as live template xml file. However, the PluginClassLoader, that loads the resource, always returns null for the resource path I provide.

Is there any chance to add a remote path for a live template?

Thanks,

Matthias

0
正式评论

Hi Matthias,

No, it's not supposed to use something beyond PluginClassLoader as default settings.

Instead, you can download external file on application start and add all templates via TemplateSettings#addTemplates.

The second way is to provide com.intellij.codeInsight.template.CustomLiveTemplate and generate/download needed templates in runtime.

Avatar
Permanently deleted user

Great, thanks!

0

请先登录再写评论。