79181619

Date: 2024-11-12 14:58:34
Score: 0.5
Natty:
Report link

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 means Idea Community
IU means Idea 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 when platformType = 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 raise ClassNotFindException in runtime

Finally, you can build, run and debug the plugin!

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: zheng xu