you need to add a dependency on the Kotlin plugin ...
# intellij-plugins
y
you need to add a dependency on the Kotlin plugin to your project, and then you'll be able to use the APIs. you can find plenty of examples in the Kotlin plugin source code
m
Sorry, I stuck with following
java.lang.ClassCastException: org.jetbrains.kotlin.psi.KtFile cannot be cast to org.jetbrains.kotlin.psi.KtFile
when run my plugin in debug mode..
Copy code
val psiFile = dataContext.getData(CommonDataKeys.PSI_FILE.name)
        
        val f = psiFile as KtFile