如何将文件模板添加到 intellij 插件?

How to add file templates to intellij plugin?

如何将(已创建的)文件模板添加到自定义 插件 for intellij idea?

官方文档没有文件模板,只描述了实时模板。

https://www.jetbrains.org/intellij/sdk/docs/tutorials/live_templates.html

也许有人也需要解决方案...

  1. 将您的文件模板移动到资源子文件夹,例如resources/fileTemplates
  2. 为您的模板文件添加 .ft 扩展名,例如TestTemplate.py.ft

一个很好的例子可以在这里找到: File templates of the Julia plugin for the IntelliJ Platform

另请参阅: