How can i add custom expression functions for Live templates in Intellij

前端 未结 1 1922
孤城傲影
孤城傲影 2021-01-31 11:43

How can add new custom functions for Live Templates in Idea Intellij.

For example i need a custom function which can convert a live template variable from Camel Case to

相关标签:
1条回答
  • 2021-01-31 12:26

    There is OpenAPI for providing Live Template functions. One can create IntelliJ IDEA plug-in that will add more functions.

    See the Macro abstract class. Plug-in should define extension point, like this one:

    <liveTemplateMacro implementation="com.intellij.codeInsight.template.macro.CapitalizeMacro"/>
    

    Search IntelliJ IDEA Community code base for sample implementations.

    0 讨论(0)
提交回复
热议问题