java - IntelliJ插件开发: A context item is shown in IDEA but not in WebStorm

标签 java intellij-idea webstorm jetbrains-ide intellij-plugin

我正在实现一个 IntelliJ IDE 插件,该插件应该适用于所有 Jetbrains 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>

关于java - IntelliJ插件开发: A context item is shown in IDEA but not in WebStorm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57010515/

相关文章:

javascript - Webstorm 崩溃,我的所有设置都消失了

java - 将数据存储在自定义检查异常中是一个坏主意吗?

java - Intellij - JAVA 错误(导入等...)未检测到

intellij-idea - Intellij 过滤查找用法/调用层次结构

java - Intellij 设置键盘滚动速度?

javascript - 使用 Webstorm 服务器提供 PHP 服务

java - 如何提高使用 mapreduce 分析日志文件的性能

java - 为什么我收到错误 "the Method Is Undefined for the type"?

java - Java 中的 Fading Indicator 消息

android - React-Native:未启用 Hermes