MCPcopy Create free account
hub / github.com/JetBrains/intellij-sdk-code-samples

github.com/JetBrains/intellij-sdk-code-samples @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
537 symbols 997 edges 164 files ⚖ Apache-2.0 77 documented · 14% updated 43d ago★ 1,231

Browse by type

Functions 410 Types & classes 127
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

IntelliJ Platform SDK Code Samples

official JetBrains project JetBrains IntelliJ Platform SDK Docs Bluesky X Build JetBrains Platform Forum Status

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] 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 - 3 Releases platform.

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 Sample Description
Action Basics Action and Action Group patterns implementation, adds entries to the Tools menu.
Kotlin Class Name Convention Inspection Local Inspection Tool, checks Kotlin class name convention. Allows to be run in Qodana
Comparing References Inspection Local Inspection Tool, adds entries to Settings | Editor | Inspections | Java | Probable Bugs.
Conditional Operator Intention Intention action, suggests converting a ternary operator into an if block and adds entry to Settings | Editor | Intentions | SDK Intentions.
Editor Basics Basic Editor APIs example with editor popup menu with extra actions.
Facet Basics Custom Facet pattern, adds SDK Facet to the Project Structure | Project Settings | Facets menu.
Framework Basics Basic SDK Demo Framework support added to the File | New | Project | Java wizard.
Live Templates Live templates for Markdown language, adds an entry to the Settings | Editor | Live Templates dialog.
Max Opened Projects Application services and listeners, shows warning dialog when more than 3 open projects are opened.
Module SDK Demo Module module type added to the File | New | Project... wizard.
Project Model Interacts with the project model, adds menu items to Tools and Editor Context menus.
Project View Pane Project View Pane listing only image files.
Project Wizard Project Wizard example with demo steps.
PSI Demo PSI Navigation features presentation.
Run Configuration Run configuration implementation with factory, options and UI.
Settings Custom settings panel, adds a settings panel to the Settings panel under Tools.
Simple Language Plugin Custom language support, defines a new Simple language with syntax highlighting, annotations, code completion, and other features.
Theme Basics Sample theme plugin with basic interface modifications.
Tool Window Custom Tool Window example plugin.
Tree Structure Provider Tree Structure Provider showing only plain text files.

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 409
Class 122
Interface 5
Function 1

Languages

Java94%
Kotlin6%

Modules by API surface

simple_language_plugin/src/main/gen/org/intellij/sdk/language/SimpleLexer.java24 symbols
project_view_pane/src/main/java/org/intellij/sdk/view/pane/ImagesProjectNode.java16 symbols
project_view_pane/src/main/java/org/intellij/sdk/view/pane/ImagesProjectViewPane.java15 symbols
oauth2/src/main/kotlin/org.intellij.sdk.oauth2/AuthService.kt15 symbols
tool_window/src/main/java/org/intellij/sdk/toolWindow/CalendarToolWindowFactory.java13 symbols
simple_language_plugin/src/main/gen/org/intellij/sdk/language/parser/SimpleParser.java12 symbols
simple_language_plugin/src/test/java/org/intellij/sdk/language/SimpleCodeInsightTest.java11 symbols
simple_language_plugin/src/main/java/org/intellij/sdk/language/psi/impl/SimplePsiImplUtil.java10 symbols
framework_basics/src/main/java/org/intellij/sdk/framework/DemoFramework.java10 symbols
simple_language_plugin/src/main/java/org/intellij/sdk/language/SimpleStructureViewElement.java9 symbols
simple_language_plugin/src/main/gen/org/intellij/sdk/language/psi/impl/SimplePropertyImpl.java9 symbols
comparing_string_references_inspection/src/main/java/org/intellij/sdk/codeInspection/ComparingStringReferencesInspection.java9 symbols

For agents

$ claude mcp add intellij-sdk-code-samples \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page