Home

Awesome

IntelliJ Platform SDK Code Samples

official JetBrains project JetBrains IntelliJ Platform SDK Docs X Follow Build Slack

Learn how to build plugins using IntelliJ Platform SDK for the JetBrains products by experimenting with our code samples. These samples show you how features work and help you jumpstart your plugins.

[!TIP] To start a new plugin project, consider using IntelliJ Platform Plugin Template which offers a pure boilerplate template to make it easier to create a new plugin project.

The code samples can also be found in the IntelliJ SDK Code Samples mirror repository.

To learn more, browse available Extension Points, explore Extension Point usages in open-source plugins using IntelliJ Platform Explorer and learn how to Explore the IntelliJ Platform API.

Target Platform

All Code Samples target the latest GA platform release. Previous releases are made available via tags.

Structure

Code Samples depend on the IntelliJ Platform SDK and Gradle as a build system.

The main plugin definition file is stored in the plugin.xml file, which is created according to the Plugin Configuration File documentation. It describes definitions of the actions, extensions, or listeners provided by the plugin.

Code Samples

Please see Code Samples topic on how to import and run code samples.

In the following table, you may find all available samples provided in the separated directories as stand-alone projects available for running with the Gradle runIde task.

Code SampleDescription
Action BasicsAction and Action Group patterns implementation, adds entries to the Tools menu.
Comparing References InspectionLocal Inspection Tool, adds entries to Settings | Editor | Inspections | Java | Probable Bugs.
Conditional Operator IntentionIntention action, suggests converting a ternary operator into an if block and adds entry to Settings | Editor | Intentions | SDK Intentions.
Editor BasicsBasic Editor APIs example with editor popup menu with extra actions.
Framework BasicsBasic SDK Demo Framework support added to the File | New | Project | Java wizard.
Kotlin DemoKotlin example extending the Main Menu with a Greeting menu group.
Live TemplatesLive templates for Markdown language, adds an entry to the Settings | Editor | Live Templates dialog.
Max Opened ProjectsApplication services and listeners, shows warning dialog when more than 3 open projects are opened.
ModuleSDK Demo Module module type added to the File | New | Project... wizard.
Product Specific - PyCharm SamplePlugin project configuration for the PyCharm IDE.
Project ModelInteracts with the project model, adds menu items to Tools and Editor Context menus.
Project View PaneProject View Pane listing only image files.
Project WizardProject Wizard example with demo steps.
PSI DemoPSI Navigation features presentation.
Run ConfigurationRun configuration implementation with factory, options and UI.
SettingsCustom settings panel, adds a settings panel to the Settings panel under Tools.
Simple Language PluginCustom language support, defines a new Simple language with syntax highlighting, annotations, code completion, and other features.
Theme BasicsSample theme plugin with basic interface modifications.
Tool WindowCustom Tool Window example plugin.
Tree Structure ProviderTree Structure Provider showing only plain text files.