Plugin with only a single ExternalAnnotator

I want to create an external annotator plugin for a language, but I got stuck at getting it to work even for java. When I add a Java ExternalAnnotator and put a print (or try to break on collectInformation), it never gets executed:

    <externalAnnotator language="JAVA" implementationClass="Annot" />
class Annot: ExternalAnnotator<Int, Int>() {
override fun collectInformation(file: PsiFile, editor: Editor, hasErrors: Boolean): Int? {
println("a")
return null
}
}

Am I missing some idea-plugin configuration or is this behavior expected? What can I do about it?

0

Hi,

is your plugin visible at File | Settings | Plugins? If it is loaded, I'd suggest to check if method com.intellij.codeInsight.daemon.impl.ExternalToolPass#collectInformationWithProgress is executed and if your annotator is found (line from the mentioned method):

ExternalLanguageAnnotators.allForFile(language, psiRoot)

Hope this helps,

Anna

0
Avatar
Permanently deleted user

Hi Anna,

I think I found the problem, for some reason when the plugin name is "Plugin display name here" (the default name), it doesn't get loaded.

Tomer

0

请先登录再写评论。