我正在实现一个应该适用于所有Jetbrains IDE的IntelliJ IDE插件。
我创建了一个声明如下的操作:
<actions>
<group id="MyGroup">
<add-to-group group-id="EditorPopupMenu"/>
<action class="my.pkg.MyAction" id="MyAction" text="My Text"/>
</group>
</actions>
当用户在编辑代码时打开上下文菜单时,它应该显示。
问题:虽然相应的上下文项存在于 IDEA 中,但在 WebStorm 中不存在。
问:为什么上下文项没有显示在 WebStorm 中?如何确保插件在所有 Jetbrains IDE 中的行为方式相同?
通过添加以下依赖项来解决:
<idea-plugin>
...
<depends>com.intellij.modules.lang</depends>
...
</idea-plugin>