【问题标题】:Add drop down to PyCharm Python Run Configuration将下拉菜单添加到 PyCharm Python 运行配置
【发布时间】:2017-04-25 05:42:07
【问题描述】:

我希望我的 PyCharm Python 运行配置有一个特殊的下拉菜单。下拉列表的内容是通过自省我的代码来填充的。

查看了源码中PythonRunConfiguration的实现,发现没有添加更多参数的扩展点。

https://github.com/JetBrains/intellij-community/blob/ced3e2d03ccaa0e10aafe697323134bcd1411209/python/src/com/jetbrains/python/run/PythonRunConfiguration.java

我是否必须实现 MyOwnPythonRunConfiguration 然后重新实现 MyOwnPythonRunConfigurationEditor + factory...?

IntelliJ 和 PyCharm 中是否有扩展点可以通过插件向现有 RunConfiguration 添加更多字段?

【问题讨论】:

    标签: intellij-idea pycharm intellij-plugin


    【解决方案1】:

    您可以提供PythonRunConfigurationExtension 接口的实现,以将选项卡添加到 Python 运行配置编辑器并修补由运行配置启动的命令行。

    【讨论】:

    • 您知道使用它的示例插件吗?我不确定如何使用它。
    • 我没有。它在 PyCharm 本身中使用,但实现是 PyCharm Professional 的一部分,因此不是开源的。
    猜你喜欢
    • 1970-01-01
    • 2015-09-30
    • 1970-01-01
    • 1970-01-01
    • 2021-11-20
    • 1970-01-01
    • 2020-09-06
    • 1970-01-01
    • 2017-04-23
    相关资源
    最近更新 更多