Hello, I am currently working on a plugin to suppo...
# intellij-plugins
Hello, I am currently working on a plugin to support the creation of parsers and transpilers. One thing I would like to do is to generate certain kotlin statements for certain rules of an ANTLR grammar when I trigger an action. However I am not sure how to create programmatically Psi elements for Kotlin code and KtCallExpressions in particular
(adding more details in the thread, to not pollute the channel) When triggering this intention:
I would like to generate some code in a Kotlin file, similar to the one highlighted, right after the one highlighted (possibly adding a newline in between)
I know where I want to insert the code but I do not know how to instantiate the KtCallExpression:
Copy code
closerMapping.addSiblingAfter(KtCallExpression(...NOT SURE WHAT TO PUT HERE...))
Do you have any pointer or advice?