I found the problem and fixed it
Firstly, IC
dose not support web-related features like JavaScript
, so we need to adjust gradle.properties
IC
meansIdea Community
IU
meansIdea Ultimate
platformType = IU
References to PSI dependencies are also not configured in the build.gradle.kts
configured that also in gradle.properties
platformBundledPlugins = com.intellij.java, JavaScript
this property means we need to use Java
and JavaScript
PSI
platformBundledPlugins = JavaScript
only works whenplatformType = IU
we can remove the PSI dependency configuration in build.gradle.kts
Before the end, we need to add language <depends></depends>
to plugin.xml
<depends>com.intellij.modules.platform</depends>
<depends>com.intellij.modules.lang</depends>
<depends>com.intellij.modules.javascript</depends>
<depends>com.intellij.java</depends>
if miss this, PSI like
JSCallExpression
will raiseClassNotFindException
in runtime
Finally, you can build, run and debug the plugin!