IntelliJ Platform Plugin SDK Help

WebStorm Plugin Development

WebStorm is an IntelliJ Platform-based product. Plugin projects for WebStorm can be developed using IntelliJ IDEA.

WebStorm Plugin Setup

Gradle Build Script

Define a dependency using webstorm(), see Versions link on top of this page for all available versions. See Local IntelliJ Platform IDE Instance for using a local installation.

A dependency on the bundled JavaScript plugin must be added using the bundledPlugin() helper.

Minimum build.gradle.kts setup:

repositories { mavenCentral() intellijPlatform { defaultRepositories() } } dependencies { intellijPlatform { webstorm("<versionNumber>") bundledPlugin("JavaScript") } }

The configuration of WebStorm plugin projects follows the methods described in Configuring Plugin Projects using the IntelliJ IDEA Product Attribute and Configuring the plugin.xml File for PhpStorm.

The table below summarizes the Gradle IntelliJ Plugin (1.x) attributes to set in the plugin project's Gradle build script. Click on an entry in the table's Attribute column to go to the documentation about that attribute. To see how these attributes appear in a similar Gradle build script for PhpStorm, see Configuring Gradle Build Script Using the IntelliJ IDEA Product Attribute.

gradle-intellij-plugin Attribute

Attribute Value

intellij.type

IU for IntelliJ IDEA Ultimate.

intellij.version

192.7142.36 Set to the same BRANCH.BUILD as the WebStorm target version.

intellij.plugins

Dependency on the JavaScript plugin.

runIde.ideDir

Path to locally installed target version of WebStorm. For example, for macOS:

/Users/$USERNAME$/Library/Application Support/JetBrains/Toolbox/apps/WebStorm/ch-0/192.7142.35/WebStorm.app/Contents.

plugin.xml

The dependency on the WebStorm APIs must be declared in the plugin.xml file. As described in Modules Specific to Functionality table, the <depends> tags must declare JavaScript.

Note that for WebStorm, the plugin.xml file must also declare a dependency on com.intellij.modules.platform because JavaScript is not recognized as a module. Otherwise, the plugin is assumed to be a legacy plugin and will not load in WebStorm.

Available WebStorm APIs

See Exploring APIs as a Consumer. Test your plugin with any version of WebStorm you wish to support.

Javascript Test Framework

To use existing test base classes, add TestFrameworkType.Plugin.JavaScript test-framework available from Plugin Test Frameworks.

Alternatively, specify com.jetbrains.intellij.javascript:javascript-test-framework:$VERSION$ as testImplementation dependency explicitly (see IntelliJ Platform Artifacts Repositories).

Open Source Plugins for WebStorm

When learning new plugin development, it is helpful to have some representative projects for reference:

Last modified: 28 October 2024