Merge pull request #238 from JohnHake/IJSDK-118

Ijsdk 118 CLion
This commit is contained in:
John Hake 2019-12-16 20:32:23 -08:00 committed by GitHub
commit 18c8880adf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 2 deletions

View File

@ -233,7 +233,7 @@
* [Compatibility with Multiple Products](basics/getting_started/plugin_compatibility.md)
* [Android Studio](products/android_studio.md)
* AppCode
* CLion
* [CLion](products/clion.md)
* DataGrip
* [GoLand](products/goland.md)
* [IntelliJ IDEA](products/idea.md)

36
products/clion.md Normal file
View File

@ -0,0 +1,36 @@
---
title: CLion Plugin Development
---
## Introduction
CLion is an IntelliJ Platform-based product.
Plugin projects for CLion can be developed using IntelliJ IDEA with the `gradle-intellij-plugin`.
## Configuring Plugin Projects Targeting CLion
The configuration of CLion 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 `gradle-intellij-plugin` attributes to set in the `build.gradle` file for a CLion plugin project:
| `gradle-intellij-plugin` Attribute | <br>Attribute Value |
|-----------|-------|
| [`intellij.type`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#intellij-platform-properties) | `CL` for the product CLion |
| [`intellij.version`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#intellij-platform-properties) | Set to the targeted CLion version, e.g. `2019.3.1` |
| [`intellij.plugins`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#intellij-platform-properties) | No specific declaration is needed. |
| [`intellij.downloadSources`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#intellij-platform-properties) | `false` is required because no public source code is available. |
| [`runIde.ideaDirectory`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#running-dsl) | Not needed; the Development Instance will automatically match intellij.type |
The dependency on the CLion APIs must be declared in the `plugin.xml` file.
As described in [Modules Specific to Functionality](/basics/getting_started/plugin_compatibility.md#modules-specific-to-functionality) table, the `<depends>` elements should contain the CLion module, as illustrated in the `plugin.xml` snippet below:
```xml
<!-- Required for core CLion functionality -->
<depends>com.intellij.modules.clion</depends>
```
## Available CLion APIs
Use the [Exploring APIs as a Consumer](/basics/getting_started/plugin_compatibility.html#exploring-apis-as-a-consumer) process to identify the JAR files under the External Library `Gradle:com.jetbrains:clion:<version>`.
Test your plugin with versions of CLion you intend to support.
## Open Source Plugins for CLion
When learning new APIs, it is helpful to have some representative projects for reference:
* [C/C++ Coverage](https://github.com/zero9178/C-Cpp-Coverage-for-CLion)
* [C/C++ Single File Execution](https://github.com/corochann/SingleFileExecutionPlugin)

View File

@ -15,7 +15,8 @@ The table below summarizes the `gradle-intellij-plugin` attributes to set in the
| [`intellij.type`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#intellij-platform-properties) | `PY` for PyCharm Professional Edition, or `PC` for PyCharm Community Edition |
| [`intellij.version`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#intellij-platform-properties) | Set to the targeted `PY` or `PC` version |
| [`intellij.plugins`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#intellij-platform-properties) | No specific declaration is needed to use `PY` or `PC` APIs |
| [`runIde.ideDirectory`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#running-dsl) | Not needed; the Development Instance will automatically match `intellij.type` |
| [`intellij.downloadSources`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#intellij-platform-properties) | `false` is required because no public source code is available. |
| [`runIde.ideaDirectory`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#running-dsl) | Not needed; the Development Instance will automatically match `intellij.type` |
The dependency on the PyCharm APIs must be declared in the `plugin.xml` file.
As described in [Configuring the plugin.xml File](dev_alternate_products.md#configuring-pluginxml), the `<depends>` tags must declare `com.intellij.modules.python`.