I added a Kotlin LineMarkerProvider to my plugin which reads a specific annotation in given kotlin file and adds a gutter icon. This line marker provider implementation uses the following classes to process the annotation present inside the kotlin file.
So I added,
as a dependency to resolve the above references during compile time as the IDE will provide them during runtime. I also included
in my plugin.xml to make sure that the IDE has kotlin support.
It all works as expected. But I have an unexpected side effect. I have another feature in the same plugin which restarts IDE in some cases using
Now this line fails to compile with the following error,
Unresolved reference: restart
If I remove the dependency compileOnly "org.jetbrains.kotlin:kotlin-compiler:1.3.11" then the plugin compiles the code to restart. But without that dependency, I cannot use `org.jetbrains.kotlin.psi.KtAnnotationEntry` and `org.jetbrains.kotlin.psi.KtExpression` inside the LineMarkerProvider implementation.
Can you please provide some input?
Thanks in advance,