Search code examples
javapluginsjetbrains-ideintellij-plugin

I cant use psiAugmentProvider in a JetBrains plugin project


When I create the project, I try to use the psiAugmentProvider, but there is some error from the IDEA:

enter image description here

This are my depends:

enter image description here

More information: my Java JDK version is 17, and the SDK is cloned from the idea-community. I can't even use the PsiAugmentProvider class in Java.

enter image description here

enter image description here

enter image description here

I am a beginner of the plugin development. I would be appreciated if someone can give me some useful information. If you need some more details about the problem, please tell me and I will provide it.

I tried to see if I needed to add other dependencies, but all failed.


Solution

  • You should add it in plugin.xml

    <depends>com.intellij.modules.java</depends>
    

    Then add plugins =

    ['com.intellij.java']

    to build.gradle

    intellij configuration.

    like

    intellij {
       plugins = ['com.intellij.java']
    }
    

    Next your psiAugmentProvider should be found, which is available in idea 2023.3.2