Allow my plugin to install on IDEA

I've built a plugin with a dependency on com.intellij.module.python. How can I configure it so that users can install it in IDEA when they have installed the Python Community Edition plugin?

It currently installs fine in PyCharm, but it doesn't show up when I browse the plugin repository from IDEA. I found a workaround by downloading my plugin and installing it from disk, but I'd like it to just show up in the plugin repository.

My plugin runs your Python code while you type it, and displays variable values and program flow:

https://github.com/donkirkby/live-py-plugin 

I added the Python dependency to my plugin.xml:

https://github.com/donkirkby/live-py-plugin/blob/master/pycharm/resources/META-INF/plugin.xml 

That was based on the instructions from here:

http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html 

0

Hi, Don!

Unfortunately plugin repository and IDEA don't correctly support dependencies on module specified inside other plugins (`com.intellij.modules.python` is defined inside Python Community Edition plugin). Therefore your plugin is not marked as compatible in plugin repository and Python plugin is not suggested to install when you install your plugin from disk to IDEA without Python plugin. We are working on this issue and it should be fixed in next month.

Meanwhile as workaround I suggest building a special IDEA version of plugin which would differ only in plugin.xml. It would have:

<!-- to be compatible with IDEA only -->
<depends>com.intellij.modules.java</depends>
<!-- to require Python Community Edition plugin -->
<depends>PythonCore</depends>

instead of:

<depends>com.intellij.modules.python</depends>

And version should be different, for example, it can have '-idea' suffix. Then each time you want to release a new version you would upload two updates - one for PyCharm (2.22.0) and one for IDEA (2.22.0-idea). The same way it is done in Kotlin plugin (https://plugins.jetbrains.com/plugin/6954-kotlin) - they have slightly different version for IDEA and Android Studio.

 
0
Avatar
Permanently deleted user

Is this issue still not fixed? I have this in my plugin xml and i dont see my plugin in IDEA:
<depends>com.intellij.modules.python</depends>

Do i still have to build two different plugin files?

0

I marked my dependencies as optional. I haven't checked to see if that's still necessary.

 

https://github.com/donkirkby/live-py-plugin/blob/master/pycharm/resources/META-INF/plugin.xml#L20-L24 

0

The fix has been deployed and now you plugin with `<depends>com.intellij.modules.python</depends>` would be available in IntelliJ IDEA, Android Studio, CLion, DataGrip, GoLand, PyCharm, Rider. When installing plugin in IDEs other then PyCharm it would be suggested to install Python (for IDEA Ultimate) or Python Community Edition plugin.

Don Kirkby, the problem with using optional dependency is that IDE would not suggest to install Python plugin when installing your plugin. Therefore I suggest to change it to change those two optional dependencies with `<depends>com.intellij.modules.python</depends>`:

<depends optional="true">com.intellij.modules.python</depends>
<depends optional="true">PythonCore</depends>

0

Thanks for letting me know, Ivan. Can you tell me which versions will have the fix? Should I wait a few months to let users upgrade before I start depending on that fix?

0

We've managed to make changes on the server side so that it works in all versions of IDE therefore you can make changes in the next version you were planning to release.

0

请先登录再写评论。