3.9 KiB
IntelliJ IDEA Plugin Development
Introduction to developing plugins for IntelliJ IDEA.
IntelliJ IDEA is available in two editions: IntelliJ Community Edition and IntelliJ IDEA Ultimate. See Choose your edition and Feature Comparison for a detailed comparison.
IntelliJ IDEA Plugin Setup
{id="ideaPluginSetup"}
Gradle Build Script
Define a dependency using intellijIdeaCommunity()
or intellijIdeaUltimate()
, see Versions link on top of this page for all available versions.
See for using a local installation.
Minimum build.gradle.kts setup:
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
dependencies {
intellijPlatform {
intellijIdeaCommunity("<versionNumber>")
}
}
The configuration of IntelliJ IDEA plugin projects follows the methods described in Configuring Plugin Projects using the IntelliJ IDEA Product Attribute.
gradle-intellij-plugin Attribute |
Attribute Value |
---|---|
intellij.type |
|
intellij.version |
IDE version, e.g. 2022.2 |
Available API
See for API from bundled plugins.
provides information specific to this edition.
Java
See Java Plugin on how to use Java-specific functionality.
PSI Cookbook lists a number of common operations for working with Java PSI.
Depending on the exact functionality, a plugin can also target to support multiple JVM languages, including Java and Kotlin.
Relevant Extension Points:
Java Test Framework
To use existing test base classes, add TestFrameworkType.Plugin.Java
test-framework available from .
Alternatively, specify com.jetbrains.intellij.java:java-test-framework:$VERSION$
as testImplementation
dependency explicitly (see IntelliJ Platform Artifacts Repositories).
Kotlin
Configure Kotlin plugin dependency with plugin ID org.jetbrains.kotlin
.
See also UAST on how to support multiple JVM languages, including Kotlin.