mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 18:27:49 +08:00
pycharm.md: 2024.2 setup
This commit is contained in:
parent
b581f214de
commit
d7cb66d29a
@ -25,6 +25,11 @@ Testing: `ProjectActivity`
|
||||
Testing: indexes
|
||||
: Indexes are now built asynchronously during tests, see [](testing_faq.md#how-to-handle-indexing).
|
||||
|
||||
### PyCharm 2024.2
|
||||
|
||||
Project setup
|
||||
: Note [changes in project setup](pycharm.md#python242) when targeting PyCharm Professional.
|
||||
|
||||
## 2024.1
|
||||
|
||||
### IntelliJ Platform 2024.1
|
||||
|
@ -14,37 +14,51 @@ Plugin projects for PyCharm can be developed using IntelliJ IDEA with the [](too
|
||||
<include from="snippets.md" element-id="jetbrainsProductOpenSourceLicense"/>
|
||||
|
||||
## Configuring Plugin Projects Targeting PyCharm
|
||||
|
||||
The configuration of PyCharm plugin projects follows the methods described in [Configuring Plugin Projects using a Product-Specific Attribute](dev_alternate_products.md#configuring-plugin-projects-using-a-product-specific-attribute), and [Configuring the plugin.xml File](dev_alternate_products.md#configuring-pluginxml).
|
||||
The table below summarizes the [](tools_gradle_intellij_plugin.md) attributes to set in the Gradle build script.
|
||||
Click on an entry in the table's *Attribute* column to go to the documentation about that attribute.
|
||||
|
||||
| `gradle-intellij-plugin` Attribute | Attribute Value |
|
||||
|--------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
|
||||
| [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) | `PY` for PyCharm Professional Edition, or `PC` for PyCharm Community Edition. |
|
||||
| [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) | Set to the targeted `PY` or `PC` version. |
|
||||
| [`intellij.plugins`](tools_gradle_intellij_plugin.md#intellij-extension-plugins) | `Pythonid` for `PY` / `PythonCore` for `PC`. |
|
||||
| [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) | `PC` for PyCharm Community Edition<br/>`PY` for PyCharm Professional Edition |
|
||||
| [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) | Set to the targeted `PC` or `PY` version. |
|
||||
| [`intellij.plugins`](tools_gradle_intellij_plugin.md#intellij-extension-plugins) | See [](#python-plugins). |
|
||||
| [`intellij.downloadSources`](tools_gradle_intellij_plugin.md#intellij-extension-downloadsources) | `false` is required because no public source code is available. |
|
||||
| [`runIde.ideDir`](tools_gradle_intellij_plugin.md#tasks-runide-idedir) | Not needed; the Development Instance will automatically match `intellij.type`. |
|
||||
| [`runIde.ideDir`](tools_gradle_intellij_plugin.md#tasks-runide-idedir) | Not needed; the Development Instance will automatically match `intellij.type`. |
|
||||
|
||||
The dependency on the PyCharm APIs must be declared in the <path>[plugin.xml](plugin_configuration_file.md)</path> file.
|
||||
As described in [Configuring the plugin.xml File](dev_alternate_products.md#configuring-pluginxml), the [`<depends>`](plugin_configuration_file.md#idea-plugin__depends) tags must declare `com.intellij.modules.python`.
|
||||
As described in [Configuring the plugin.xml File](dev_alternate_products.md#configuring-pluginxml), the [`<depends>`](plugin_configuration_file.md#idea-plugin__depends) tag must declare `com.intellij.modules.python`.
|
||||
|
||||
### Python Plugins
|
||||
|
||||
| Plugin | Plugin ID | API |
|
||||
|------------------------------------------------------------------------------------------------|--------------|-------------------------------------|
|
||||
| [Python Community Edition](https://plugins.jetbrains.com/plugin/7322-python-community-edition) | `PythonCore` | PyCharm Community Edition (`PC`) |
|
||||
| [Python](https://plugins.jetbrains.com/plugin/631-python) | `Pythonid` | PyCharm Professional Edition (`PY`) |
|
||||
|
||||
#### Python Plugins 2024.2
|
||||
{id="python242"}
|
||||
|
||||
<primary-label ref="2024.2"/>
|
||||
|
||||
When using functionality from `Pythonid`, a dependency on _both_ `PythonCore` and `Pythonid` is now required.
|
||||
|
||||
### Sample Plugin
|
||||
|
||||
See the SDK code sample [`pycharm_basics`](%gh-sdk-samples-master%/product_specific/pycharm_basics/) for an example configuration.
|
||||
Please note that this code sample must be imported into Gradle explicitly, as it is not included in the `_gradleCompositeBuild`.
|
||||
Note that this code sample must be imported into Gradle explicitly, as it is not included in the `_gradleCompositeBuild`.
|
||||
|
||||
## Available PyCharm APIs
|
||||
|
||||
See [](intellij_community_plugins_extension_point_list.md) for PyCharm Community.
|
||||
|
||||
The plugin [Python](https://plugins.jetbrains.com/plugin/631-python) (Plugin ID `Pythonid`) defines the APIs for PyCharm Professional.
|
||||
|
||||
The plugin [Python Community Edition](https://plugins.jetbrains.com/plugin/7322-python-community-edition) (Plugin ID `PythonCore`) defines the APIs for PyCharm Community.
|
||||
|
||||
These plugins include the modules `openapi` and `python-psi-api`.
|
||||
These are considered stable APIs, but care should be taken to test your plugin with any version of PyCharm you wish to support.
|
||||
|
||||
## Additional Articles and Resources
|
||||
|
||||
* [Webinar Recording: "Live Development of a PyCharm Plugin" with Joachim Ansorg](https://blog.jetbrains.com/pycharm/2019/01/webinar-recording-live-development-of-a-pycharm-plugin-with-joachim-ansorg/)
|
||||
|
||||
## Open Source Plugins for PyCharm
|
||||
|
||||
When learning new development configurations, it is helpful to have some representative projects for reference:
|
||||
* [Flake8 Support](https://github.com/jansorg/pycharm-flake8) Adds support for flake8's # noqa comments in PyCharm.
|
||||
|
||||
* [Flake8 Support](https://github.com/jansorg/pycharm-flake8) Adds support for flake8's `# noqa` comments in PyCharm.
|
||||
|
Loading…
x
Reference in New Issue
Block a user