A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://plugins.jetbrains.com/docs/intellij/plugin-extensions.html below:

Extensions | IntelliJ Platform Plugin SDK

Extensions

Extensions are the most common way for a plugin to extend the IntelliJ Platform's functionality in a way that is not as straightforward as adding an action to a menu or toolbar.

The following are some of the most common tasks achieved using extensions:

There are more than 1700 extension points available in the platform and the bundled plugins, allowing customizing different parts of the IDE behavior.

Exploring Available Extensions Documentation

Lists for other IDEs are available under Product Specific (for example, PhpStorm).

IntelliJ Platform Explorer

Browse usages inside existing implementations of open-source IntelliJ Platform plugins via IntelliJ Platform Explorer.

Code Insight

Alternatively (or when using 3rd party extension points), all available extension points for the specified namespace (defaultExtensionNs) can be listed using auto-completion inside the <extensions> block in plugin.xml. Use in the lookup list to access more information about the extension point and implementation (if applicable).

See Explore the IntelliJ Platform API for more information and strategies.

Declaring Extensions

Auto-completion, Quick Documentation, and other code insight features are available on extension point tags and attributes in plugin.xml.

Declaring Extension
  1. Add an <extensions> element to plugin.xml if it's not yet present there. Set the defaultExtensionNs attribute to one of the following values:

  2. Add a new child element to the <extensions> element. The child element's name must match the name of the used extension point.

  3. Depending on the type of the extension point, do one of the following:

    See the Declaring Extension Point section for details.

  4. In addition to attributes defined by the extension point, the extension element can specify basic attributes (see the attributes list in An Extension section).

  5. Implement the extension API as required (see Implementing Extension).

    To clarify this procedure, consider the following sample section of the plugin.xml file that defines two extensions designed to access the com.intellij.appStarter and com.intellij.projectTemplatesFactory extension points in the IntelliJ Platform, and one extension to access the another.plugin.myExtensionPoint extension point in another plugin another.plugin:

    <!-- Declare extensions to access extension points in the IntelliJ Platform. These extension points have been declared using "interface". --> <extensions defaultExtensionNs="com.intellij"> <appStarter implementation="com.example.MyAppStarter"/> <projectTemplatesFactory implementation="com.example.MyProjectTemplatesFactory"/> </extensions> <!-- Declare extensions to access extension points in a custom plugin "another.plugin". The "myExtensionPoint" extension point has been declared using "beanClass" and exposes custom properties "key" and "implementationClass". --> <extensions defaultExtensionNs="another.plugin"> <myExtensionPoint key="keyValue" implementationClass="com.example.MyExtensionPointImpl"/> </extensions>

    Implementing Extension

    Please note the following important points:

    When using Kotlin:

      Extension Properties Code Insight

      Several tooling features are available to help configure bean class extension points in plugin.xml.

      Required Properties

      Properties annotated with RequiredElement are inserted automatically and validated.

      If the given property is allowed to have an explicit empty value, set allowEmpty to true.

      Class names

      Property names matching the following list will resolve to a fully qualified class name:

      A required parent type can be specified in the extension point declaration via <with>:

      <extensionPoint name="myExtension" beanClass="MyExtensionBean"> <with attribute="psiElementClass" implements="com.intellij.psi.PsiElement"/> </extensionPoint>

      Custom resolve

      Property name language (or ending in *Language) resolves to all present Language IDs.

      Similarly, action and actionId (2024.3+) resolve to all registered <action> IDs.

      Deprecation/ApiStatus

      Properties marked as @Deprecated or annotated with any of ApiStatus @Internal, @Experimental, @ScheduledForRemoval, or @Obsolete will be highlighted accordingly.

      Enum properties

      Enum attributes support code insight with lowerCamelCased notation. Note: The Enum implementation must not override toString().

      I18n

      Annotating with @Nls validates a UI String capitalization according to the text property Capitalization enum value.

      06 May 2025


      RetroSearch is an open source project built by @garambo | Open a GitHub Issue

      Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

      HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4