问题
I am trying to add support for kotlin for one of the IDEA plugins.
So far, I found this page and understood that I need to work with kotlin PSI files, such as KtClass
and others.
When I was setting up my project I added idea source files to sdk(by cloning this repo), to make it easier to debug + see documentation.
However it seems that these idea source files doesn't include kotlin source files, such as mentioned KtClass
and others, which I use in my project. Currently I see only decompiled version of these files.
Is there any way to add them like with other IDEA source files?
回答1:
Those source files belongs to the Kotlin plugin, which is not strictly a part of IntelliJ IDEA distribution. You need to add the Kotlin plugin source to the project as well as the IDEA source.
There're two modules needed:
- https://github.com/JetBrains/kotlin/tree/master/idea
- https://github.com/JetBrains/kotlin/tree/master/compiler/psi/src/org/jetbrains/kotlin
来源:https://stackoverflow.com/questions/50183198/how-to-add-kotlin-psi-source-files-to-idea-plugin-project-configuration