Merge pull request #240 from JohnHake/IJSDK-672

IJSDK-672 DataGrip product page
This commit is contained in:
John Hake 2020-01-31 11:52:02 -08:00 committed by GitHub
commit 9d8cc1abbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 1 deletions

View File

@ -234,7 +234,7 @@
* [Android Studio](products/android_studio.md)
* AppCode
* [CLion](products/clion.md)
* DataGrip
* [DataGrip](products/data_grip.md)
* [GoLand](products/goland.md)
* [IntelliJ IDEA](products/idea.md)
* [Tomcat Integration](reference_guide/tomcat_integration.md)

36
products/data_grip.md Normal file
View File

@ -0,0 +1,36 @@
---
title: DataGrip Plugin Development
---
## Introduction
DataGrip is an IntelliJ Platform-based product.
Plugin projects targeting DataGrip can be developed using IntelliJ IDEA with the `gradle-intellij-plugin`.
## Configuring Plugin Projects Targeting DataGrip
The configuration of DataGrip plugin projects follows the methods described in [Configuring Plugin Projects using the IntelliJ IDEA Product Attribute](dev_alternate_products.md#configuring-plugin-projects-using-the-intellij-idea-product-attribute), and [Configuring the plugin.xml File](dev_alternate_products.md#configuring-pluginxml).
> **Note** DataGrip plugin development may require setting an additional Gradle attribute: `runIde.jvmArgs`. See table below.
The table below summarizes the `gradle-intellij-plugin` attributes to set in the `build.gradle` file:
| `gradle-intellij-plugin` Attribute | Attribute Value |
|-----------|-------|
| [`intellij.type`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#intellij-platform-properties) | `IU` for IntelliJ IDEA Ultimate.<br>(`IC` is incompatible with the required `DatabaseTools` plugin.) |
| [`intellij.version`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#intellij-platform-properties) | `2019.3` Set to the same version as the DataGrip target version, as set by `runIde.ideaDirectory` |
| [`intellij.plugins`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#intellij-platform-properties) | `plugins 'DatabaseTools'` Dependency on the bundled `DatabaseTools` plugin. |
| [`runIde.ideaDirectory`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#running-dsl) | Path to locally installed target version of DataGrip. For example, for macOS:<br>`/Users/<user name>/Library/Application Support/JetBrains/Toolbox/apps/datagrip/ch-0/193.5233.139/DataGrip.app/Contents` |
| [`runIde.jvmArgs`](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#running-dsl) | `jvmArgs '-Didea.platform.prefix=DataGrip'`<br>Only required for `gradle-intellij-plugin` v0.4.16 or earlier. |
The additional attribute `runIde.jvmArgs` is required for versions of the `gradle-intellij-plugin` 0.4.16 and earlier.
This attribute declares that Gradle should use the DataGrip platform to run/debug plugins in a development instance.
It is not required for building plugins and manually installing them in DataGrip.
Benign, but redundant attribute if used for later versions of the `gradle-intellj-plugin`.
The dependency on the DataGrip 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>` tags must declare `com.intellij.database`.
**Note** that DataGrip plugins must also declare a dependency on `com.intellij.modules.platform` because `com.intellij.database` is not recognized as a module.
Consequently, without the `com.intellij.modules.platform` declaration the plugin is assumed to be a [legacy plugin](/basics/getting_started/plugin_compatibility.md#declaring-plugin-dependencies) and will not load in DataGrip.
## Available DataGrip APIs
Use the [Exploring APIs as a Consumer](/basics/getting_started/plugin_compatibility.html#exploring-apis-as-a-consumer) process to identify the libraries in `DatabaseTools`.
Test your plugin with any version of DataGrip you wish to support.