~Bumped into weird problem while writing IJ plugin...
# intellij-plugins
d
Bumped into weird problem while writing IJ plugin which uses
kotlin-compiler.jar
. The problem is that the jar contains part of IJ API, in particular
com.intellij.openapi.application.ApplicationManager
. So at runtime there are two sets of openapi classes namespaced by classloader. My plugin sees classes from
kotlin-compiler.jar
which are not initialised, e.g.
ApplicationManager.getApplication()
is
null
. Does anyone know what is the proper workaround?
<— The answer is to use
kotlin-compiler-embeddable
.