IntelliJ Platform SDK Documentation

repository·main·Indexed 23 days ago

https://github.com/jetbrains/intellij-sdk-docs

Primary resource for developers building plugins for JetBrains IDEs. Includes guides and sample projects for implementing AnAction, local code inspections via com.intellij.localInspection, intentions via com.intellij.intentionAction, facets, framework types, live templates, and editor interactions using TypedHandlerDelegate.

Tokens
195.4K
Snippets
256
Records
1.1K
Agent score
79%

What's inside IntelliJ Platform SDK Documentation

  1. Overview of IntelliJ Platform SDK Code Samples

    main

    The IntelliJ Platform SDK Code Samples repository provides practical examples to help developers learn how to build plugins for JetBrains products. These samples demonstrate how various platform features work and can be used to jumpstart plugin development.

    Key resources for exploring the platform include:

  2. Overview of available User Interface components

    main

    The IntelliJ Platform provides specialized components for various UI needs. Key component areas include:

  3. Explore the Editor Sample Project

    main
    The Editor Sample Project demonstrates fundamental IntelliJ Platform SDK capabilities related to editor interaction. It includes a TypedHandlerDelegate implementation that automatically inserts the string editor_basics at the top of the document whenever a user types a character. It also provides several sample actions available in the Editor context menu to demonstrate text manipulation, caret management, and caret position reporting.
  4. Targeting IntelliJ Platform-based IDEs other than IntelliJ IDEA

    main

    You can develop plugins for any IDE based on the IntelliJ Platform (e.g., WebStorm, PyCharm, PhpStorm). To do this, you must modify your Gradle build script to specify the target product and update your plugin.xml to declare necessary dependencies on product-specific plugins or modules.

    There are two primary ways to configure this depending on which Gradle plugin you use:

    1. IntelliJ Platform Gradle Plugin (2.x): Use built-in extensions to define the target platform.
    2. Gradle IntelliJ Plugin (1.x) [Obsolete]: Use the intellij.type property or the IntelliJ IDEA product attribute approach.
  5. Run background processes in IntelliJ Platform

    main

    The IntelliJ Platform provides two primary ways to execute time-consuming computations on background threads:

    1. Progress API: Use this when you need to track progress (textual or fractional) and allow the user or the system to cancel the task. This is the preferred method for tasks with visible UI components.
    2. Application.executeOnPooledThread(): Use this for simple background tasks that do not require progress tracking or cancellation mechanisms.

    Note for 2024.1+: Plugins targeting version 2024.1 or later should use Kotlin coroutines instead of the Progress API. Coroutines are more performant and provide built-in cancellation support. Refer to the execution_contexts.topic for coroutine-based APIs.