I've been trying to create a tool to perform class...
# compiler
f
I've been trying to create a tool to perform class/methods/field name migrations for Kotlin files. I have tried using the
kotlin-compiler
package to parse the Kotlin files, perform PSI renaming transformations, and then write the transformed PSI as text. However, when I try to use the PSI
add
and
replace
methods, I get the following error:
Copy code
java.lang.IllegalArgumentException: Missing extension point: com.intellij.treeCopyHandler in area null
Is this the right way of going about this? If it is, how do I resolve this error?
r
The CLI compiler uses an immutable PSI tree
#arrow-meta works around it using a parallel representation when performing transformations on the AST and recreating the KtFile
f
Is it possible I can use this for my own project?
r
yes
you can copy the internals or rethink your plugin with Arrow Meta if you find it suits your problem.