Creating PyCharm plugins

Hello folks,

What is the process for creating plugins for PyCharm?

I'd like to create tools for some of my companys internal utilities but so far I only see information about creating plugins for Idea.

Cheers

2
Avatar
Permanently deleted user

The process is essentially the same. PyCharm is basically a subset of IntelliJ IDEA with the Python plugin.

For more specific questions, use the Open API and Plugin Development forum: http://devnet.jetbrains.net/community/idea/open_api_and_plugin_development

-1

I figured that much, but I wasn't completely certain whether I could only build plugins in Idea or not. Also, I'm curious (because it's not entirely obvious) where to specify what applications the plugin is targeted for. The plugin list for Idea is clearly much larger than the one for PyCharm for instance. When you run "Prepare Plugin Module for Deployment" there is no dialog box that asks which of the JetBrains IDEs you'd like to prepare it for... nor does it appear that there is any easy way to test it in PyCharm, running the plugin always runs IntelliJ.

I'll try the other forums.

0
Avatar
Permanently deleted user

How does one write the plugin.xml for a PythonRunConfigurationExtension ?

 

<extensions defaultExtensionNs="com.intellij">
<Pythonid.runConfigurationExtension implementation="com.foo.bar.SomeExtension"/>
</extensions>

? is this the way ? Are there other tags required ?
I am trying to create such an extension but my Java code is not called.
0
Avatar
Permanently deleted user

I got it to work with

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

<
extensions defaultExtensionNs="Pythonid">
<runConfigurationExtension implementation="com.foo.bar.SomeExtension"/>
</extensions>
0
Avatar
Permanently deleted user

I have the same issue, but IntelliJ does not recognize 

com.intellij.modules.python

 

I am using Gradle so I know I should add a dependency in the build.gradle file, but I don't know exactly how. 

3
Avatar
Permanently deleted user
0

See details about platforms compatibility at 

http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
0
Avatar
Permanently deleted user
com.intellij.modules.python is not recognnized my my IDE as well. 
It says cannot resolve com.intellij.modules.python.
Where can I download this dependency jar from?
1
Avatar
Permanently deleted user

If you search for "com.intellij.modules.python" in files of type XML in github you find some hits like this :

https://github.com/vlasovskikh/intellij-micropython/blob/master/src/main/resources/META-INF/plugin.xml

I think that `com.intellj.modules.python` refers to the Python plugin of IntelliJ.

To develop an IntelliJ plugin you need to follow the instructions on https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started.html

This page https://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_dependencies.html seems to be the most on spot reference and says the plugins that you want your custom plugin to depend upon have to be added to the classpath of the IntelliJ SDK. Refer to https://intellij-support.jetbrains.com/hc/en-us/articles/206544519-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs to find out where the python plugin is installed on your computer.

1

SnakeCharm plugin is also compatible with `PyCharm` or `Some IntelliJ IDE with python plugin installed`, it is done using dependencies in plugin.xml:

<!-- PyCharm / Python plugin dependency -->
<depends>com.intellij.modules.lang</depends>
<depends optional="true">com.intellij.modules.python</depends>

(https://github.com/JetBrains-Research/snakecharm/blob/master/src/main/resources/META-INF/plugin.xml)

All dependencies will be collected and downloaded automatically if you are using `org.jetbrains.intellij` gradle plugin, see https://github.com/JetBrains-Research/snakecharm/blob/master/build.gradle.

The gradle plugin allows to run plugin in debug version of PyCharm or IntelliJ IDEA with python plugin using runIde gradle task (IDEA and python versions for debug instance are harcoded in https://github.com/JetBrains-Research/snakecharm/blob/master/gradle.properties)

Also you can build plugin assembly and publish it to the Plugins Repository. 

More details about intellij gradle plugin I'll find at https://github.com/JetBrains/gradle-intellij-plugin

0

请先登录再写评论。