mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
synchronize tabs
This commit is contained in:
parent
6bf49b947c
commit
aa5b9831ec
@ -28,8 +28,8 @@ The plugin provides the functionalities like:
|
||||
## Usage
|
||||
To enable this plugin in your Gradle-based project, register the plugin in the Gradle build script's `plugins` section:
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
plugins {
|
||||
@ -38,7 +38,7 @@ plugins {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
plugins {
|
||||
@ -73,8 +73,8 @@ For switching to the snapshot release, point Gradle to the dedicated snapshot re
|
||||
>
|
||||
{type="note"}
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
`build.gradle.kts`
|
||||
```kotlin
|
||||
@ -93,7 +93,7 @@ pluginManagement {
|
||||
}
|
||||
```
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
`build.gradle`
|
||||
```groovy
|
||||
@ -126,8 +126,8 @@ It is mandatory to specify at least the [`intellij.version`](#intellij-extension
|
||||
**Example:**
|
||||
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
intellij {
|
||||
@ -138,7 +138,7 @@ intellij {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
intellij {
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
To add some JVM arguments while launching the IDE, configure [`runIde`](tools_gradle_intellij_plugin.md#runide-task) task as follows:
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
tasks {
|
||||
@ -22,7 +22,7 @@ tasks {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
runIde {
|
||||
@ -37,8 +37,8 @@ runIde {
|
||||
|
||||
Using the [very same task documentation](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.JavaExec.html), configure [`runIde`](tools_gradle_intellij_plugin.md#runide-task) task:
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
tasks {
|
||||
@ -49,7 +49,7 @@ tasks {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
runIde {
|
||||
@ -66,8 +66,8 @@ See [](ide_development_instance.md#enabling-auto-reload) for important caveats.
|
||||
|
||||
Configure [`runIde`](tools_gradle_intellij_plugin.md#runide-task) task as follows:
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
tasks {
|
||||
@ -78,7 +78,7 @@ tasks {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
runIde {
|
||||
@ -93,8 +93,8 @@ runIde {
|
||||
|
||||
Building searchable options can be disabled as a task:
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
tasks {
|
||||
@ -105,7 +105,7 @@ tasks {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
buildSearchableOptions.enabled = false
|
||||
@ -127,8 +127,8 @@ In the Gradle `runIde` run configuration, add the log file path according to [sa
|
||||
[`prepareSandbox`](tools_gradle_intellij_plugin.md#preparesandbox-task) task is a [`Sync`](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Sync.html) task and can be modified accordingly.
|
||||
Something like following should work:
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
tasks {
|
||||
@ -141,7 +141,7 @@ tasks {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
prepareSandbox {
|
||||
|
@ -17,8 +17,8 @@ The [Gradle Grammar-Kit Plugin](https://github.com/JetBrains/gradle-grammar-kit-
|
||||
## Usage
|
||||
To enable this plugin in your Gradle-based project, register the plugin in the Gradle build script's `plugins` section:
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
plugins {
|
||||
@ -27,7 +27,7 @@ plugins {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
plugins {
|
||||
@ -61,8 +61,8 @@ After the Gradle Grammar-Kit Plugin is applied, the `grammarKit` extension can b
|
||||
**Example:**
|
||||
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
grammarKit {
|
||||
@ -73,7 +73,7 @@ grammarKit {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
grammarKit {
|
||||
|
@ -110,8 +110,8 @@ Consequently, [dependencies](plugin_dependencies.md) on Java functionality are e
|
||||
```
|
||||
* Gradle build script (_required_):
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
intellij {
|
||||
@ -120,7 +120,7 @@ Consequently, [dependencies](plugin_dependencies.md) on Java functionality are e
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
intellij {
|
||||
@ -153,8 +153,8 @@ Consequently, [dependencies](plugin_dependencies.md) on AppCode and CLion functi
|
||||
|
||||
* Gradle build script (_required_):
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
intellij {
|
||||
@ -163,7 +163,7 @@ Consequently, [dependencies](plugin_dependencies.md) on AppCode and CLion functi
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
intellij {
|
||||
@ -191,8 +191,8 @@ Consequently, [dependencies](plugin_dependencies.md) on AppCode and CLion functi
|
||||
|
||||
* Gradle build script (_required_):
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
intellij {
|
||||
@ -201,7 +201,7 @@ Consequently, [dependencies](plugin_dependencies.md) on AppCode and CLion functi
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
intellij {
|
||||
|
@ -49,16 +49,16 @@ Available JBR variants are:
|
||||
>
|
||||
{type="note"}
|
||||
|
||||
<tabs>
|
||||
<tabs group="project-type">
|
||||
|
||||
<tab title="Gradle">
|
||||
<tab title="Gradle" group-key="gradle">
|
||||
|
||||
By default, the Gradle plugin will fetch and use the version of the JetBrains Runtime for the Development Instance corresponding to the version of the IntelliJ Platform used for building the plugin project.
|
||||
If required, an alternative version can be specified using [`runIde.jbrVersion`](tools_gradle_intellij_plugin.md#runide-task-jbrversion) task property.
|
||||
|
||||
</tab>
|
||||
|
||||
<tab title="DevKit">
|
||||
<tab title="DevKit" group-key="devkit">
|
||||
|
||||
The [Run Configuration](https://www.jetbrains.com/help/idea/run-debug-configuration.html) for a DevKit-based plugin project controls the JDK used to run and debug a plugin project in a Development Instance.
|
||||
The default Run Configuration uses the same JDK for building the plugin project and running the plugin in a Development Instance.
|
||||
@ -79,9 +79,9 @@ Please note that any unloading problems in a production environment will ask the
|
||||
>
|
||||
{type="warning"}
|
||||
|
||||
<tabs>
|
||||
<tabs group="project-type">
|
||||
|
||||
<tab title="Gradle">
|
||||
<tab title="Gradle" group-key="gradle">
|
||||
|
||||
Enabled by default for target platform 2020.2 or later.
|
||||
|
||||
@ -95,7 +95,7 @@ After starting the sandbox IDE instance, run [`buildPlugin`](tools_gradle_intell
|
||||
|
||||
</tab>
|
||||
|
||||
<tab title="DevKit">
|
||||
<tab title="DevKit" group-key="devkit">
|
||||
|
||||
Add system property `idea.auto.reload.plugins` in the Plugin DevKit [run configuration](running_and_debugging_a_plugin.md).
|
||||
|
||||
@ -109,8 +109,8 @@ To disable auto-reload, set `idea.auto.reload.plugins` to `false` explicitly (20
|
||||
The _Sandbox Home_ directory contains the [settings, caches, logs, and plugins](#development-instance-settings-caches-logs-and-plugins) for a Development Instance of the IDE.
|
||||
This information is stored in a different location than for the [installed IDE itself](https://intellij-support.jetbrains.com/hc/en-us/articles/206544519-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs).
|
||||
|
||||
<tabs>
|
||||
<tab title="Gradle">
|
||||
<tabs group="project-type">
|
||||
<tab title="Gradle" group-key="gradle">
|
||||
|
||||
For Gradle-based plugins, the default Sandbox Home location is defined by the [Gradle IntelliJ Plugin](tools_gradle_intellij_plugin.md).
|
||||
See [Configuring a Gradle Plugin Project](gradle_prerequisites.md) for more information about specifying a Sandbox Home location.
|
||||
@ -121,7 +121,7 @@ The default Sandbox Home location is:
|
||||
|
||||
</tab>
|
||||
|
||||
<tab title="DevKit">
|
||||
<tab title="DevKit" group-key="devkit">
|
||||
|
||||
For DevKit-based plugins, the default Sandbox Home location is defined in the IntelliJ Platform Plugin SDK.
|
||||
See specifying the [Sandbox Home for DevKit Projects](setting_up_environment.md) for more information.
|
||||
|
@ -78,8 +78,8 @@ Otherwise, it'll be skipped.
|
||||
|
||||
An example [`signPlugin`](tools_gradle_intellij_plugin.md#signplugin-task) task configuration may look like:
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
signPlugin {
|
||||
@ -108,7 +108,7 @@ publishPlugin {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
signPlugin {
|
||||
@ -152,8 +152,8 @@ To avoid storing hard-coded values in the project configuration, the most suitab
|
||||
|
||||
To specify secrets like `PUBLISH_TOKEN` and values required for the [`signPlugin`](tools_gradle_intellij_plugin.md#signplugin-task) task, modify your Gradle configuration as follows:
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
signPlugin {
|
||||
@ -168,7 +168,7 @@ publishPlugin {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
signPlugin {
|
||||
|
@ -50,8 +50,8 @@ A Gradle build script snippet setting a plugin project to target PyCharm is show
|
||||
The [Gradle IntelliJ Plugin](tools_gradle_intellij_plugin.md) will fetch the matching build of PyCharm Professional to define the APIs available, and use that build of PyCharm (and associated JetBrains Runtime) as the Development Instance.
|
||||
No additional product-specific configuration needs to be set in the Gradle build script:
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
intellij {
|
||||
@ -61,7 +61,7 @@ intellij {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
intellij {
|
||||
@ -132,8 +132,8 @@ The exact path format varies by operating system.
|
||||
|
||||
This snippet is an example for configuring the Setup and Running DSLs in a Gradle build script specific to developing a plugin for _targetIDE_.
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
intellij {
|
||||
@ -157,7 +157,7 @@ runIde {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
intellij {
|
||||
|
@ -78,9 +78,9 @@ See [Inspections](https://jetbrains.design/intellij/text/inspections/) topic in
|
||||
|
||||
To highlight a region of text as a warning or error:
|
||||
|
||||
<tabs>
|
||||
<tabs group="platform-version">
|
||||
|
||||
<tab title="2020.1 and later">
|
||||
<tab title="2020.1 and later" group-key="2020.1">
|
||||
|
||||
```java
|
||||
holder.newAnnotation(HighlightSeverity.WARNING, "Invalid code") // or HighlightSeverity.ERROR
|
||||
@ -90,7 +90,7 @@ To highlight a region of text as a warning or error:
|
||||
|
||||
</tab>
|
||||
|
||||
<tab title="Pre-2020.1">
|
||||
<tab title="Pre-2020.1" group-key="pre-2020.1">
|
||||
|
||||
Call `createWarningAnnotation()`/`createErrorAnnotation()` on the [`AnnotationHolder`](%gh-ic%/platform/analysis-api/src/com/intellij/lang/annotation/AnnotationHolder.java), and optionally calls `registerFix()` on the returned [`Annotation`](%gh-ic%/platform/analysis-api/src/com/intellij/lang/annotation/Annotation.java) object to add a quick fix for the error or warning.
|
||||
|
||||
@ -101,9 +101,9 @@ Call `createWarningAnnotation()`/`createErrorAnnotation()` on the [`AnnotationHo
|
||||
### Syntax
|
||||
To apply additional syntax highlighting (2020.1 and later):
|
||||
|
||||
<tabs>
|
||||
<tabs group="platform-version">
|
||||
|
||||
<tab title="2020.1 and later">
|
||||
<tab title="2020.1 and later" group-key="2020.1">
|
||||
|
||||
```java
|
||||
holder.newSilentAnnotation(HighlightSeverity.INFORMATION)
|
||||
@ -114,7 +114,7 @@ To apply additional syntax highlighting (2020.1 and later):
|
||||
|
||||
</tab>
|
||||
|
||||
<tab title="Pre-2020.1">
|
||||
<tab title="Pre-2020.1" group-key="pre-2020.1">
|
||||
|
||||
Call `AnnotationHolder.createInfoAnnotation()` with an empty message and then [`Annotation.setTextAttributes()`](%gh-ic%/platform/analysis-api/src/com/intellij/lang/annotation/Annotation.java).
|
||||
|
||||
|
@ -103,8 +103,8 @@ There are two parts to the example: the repository and the dependency sections.
|
||||
This code snippet selects the release repository with the first URL, and the repository of IntelliJ Platform dependencies with the second URL.
|
||||
The second URL is needed because this example selects individual modules.
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
repositories {
|
||||
@ -114,7 +114,7 @@ repositories {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
repositories {
|
||||
@ -130,8 +130,8 @@ repositories {
|
||||
|
||||
This code snippet specifies the desired module artifacts.
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
dependencies {
|
||||
@ -141,7 +141,7 @@ dependencies {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
dependencies {
|
||||
|
@ -52,8 +52,8 @@ export ORG_GRADLE_PROJECT_intellijPublishToken='YOUR_TOKEN'
|
||||
Now provide the environment variable in the run configuration with which you run the [`publishPlugin`](tools_gradle_intellij_plugin.md#publishplugin-task) task locally.
|
||||
To do so, create a Gradle run configuration (if not already done), choose your Gradle project, specify the [`publishPlugin`](tools_gradle_intellij_plugin.md#publishplugin-task) task, and then add the environment variable.
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
publishPlugin {
|
||||
@ -62,7 +62,7 @@ publishPlugin {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
publishPlugin {
|
||||
@ -114,8 +114,8 @@ If successfully deployed, any users who currently have your plugin installed on
|
||||
You may also deploy plugins to a release channel of your choosing, by configuring the [`publishPlugin.channels`](tools_gradle_intellij_plugin.md#publishplugin-task-channels) property.
|
||||
For example:
|
||||
|
||||
<tabs>
|
||||
<tab title="Kotlin">
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
publishPlugin {
|
||||
@ -124,7 +124,7 @@ publishPlugin {
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy">
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
publishPlugin {
|
||||
|
Loading…
x
Reference in New Issue
Block a user