# Plugin Configuration File
Plugin configuration file contains all the information about the plugin, as well as all registered extensions, actions, listeners, etc.
The plugin.xml configuration file contains all the information about the plugin, which is displayed in the [plugins' settings dialog](https://www.jetbrains.com/help/idea/managing-plugins.html), and all registered extensions, actions, listeners, etc.
The sections below describe all the elements in detail.
The example plugin.xml files can be found in the [IntelliJ SDK Docs Code Samples](https://github.com/JetBrains/intellij-sdk-code-samples) repository.
## Additional Plugin Configuration Files
A plugin can contain additional configuration files beside the main plugin.xml.
They have the same format, and they are included with the `config-file` attribute of [``](#idea-plugin__depends) elements specifying [plugin dependencies](plugin_dependencies.md).
However, some elements and attributes required in plugin.xml are ignored in additional configuration files.
If the requirements differ, the documentation below will state it explicitly.
One use case for additional configuration files is when a plugin provides optional features that are only available in some IDEs and require [certain modules](plugin_compatibility.md#modules-specific-to-functionality).
## Useful Resources
Please make sure to follow the guidelines from [Plugin Overview page](https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html) for an optimal presentation of your plugin on JetBrains Marketplace.
The _Busy Plugin Developers. Episode 2_ discusses [5 tips for optimizing JetBrains Marketplace plugin page](https://youtu.be/oB1GA9JeeiY?t=52) in more detail.
See also [](marketing.md) about widgets and badges.
## Configuration Structure Overview
> If an element or an attribute is not documented on this page, consider them as configuration items intended to be used by JetBrains only.
> They must not be used by third-party plugins.
>
{title="Private Configuration Elements" style="warning"}
Deprecated elements are omitted in the list below.
[//]: # (GENERATED CONTENT START)
[//]: # (This content is generated by generate_descriptor_pages.main.kts script.)
[//]: # (DO NOT EDIT IT MANUALLY)
- [``](#idea-plugin)
- [``](#idea-plugin__id)
- [``](#idea-plugin__name)
- [``](#idea-plugin__version)
- [``](#idea-plugin__product-descriptor)
- [``](#idea-plugin__idea-version)
- [``](#idea-plugin__vendor)
- [``](#idea-plugin__description)
- [``](#idea-plugin__change-notes)
- [``](#idea-plugin__depends)
- [``](#idea-plugin__incompatible-with)
- [``](#idea-plugin__extensions)
- [An Extension](#idea-plugin__extensions__-)
- [``](#idea-plugin__extensionPoints)
- [``](#idea-plugin__extensionPoints__extensionPoint)
- [``](#idea-plugin__extensionPoints__extensionPoint__with)
- [``](#idea-plugin__resource-bundle)
- [``](#idea-plugin__actions)
- [``](#idea-plugin__actions__action)
- [``](#idea-plugin__actions__action__add-to-group)
- [``](#idea-plugin__actions__action__keyboard-shortcut)
- [``](#idea-plugin__actions__action__mouse-shortcut)
- [``](#idea-plugin__actions__action__override-text)
- [``](#idea-plugin__actions__action__synonym)
- [``](#idea-plugin__actions__action__abbreviation)
- [``](#idea-plugin__actions__group)
- [``](#idea-plugin__actions__action)
- [``](#idea-plugin__actions__action__add-to-group)
- [``](#idea-plugin__actions__action__keyboard-shortcut)
- [``](#idea-plugin__actions__action__mouse-shortcut)
- [``](#idea-plugin__actions__action__override-text)
- [``](#idea-plugin__actions__action__synonym)
- [``](#idea-plugin__actions__action__abbreviation)
- [``](#idea-plugin__actions__action__add-to-group)
- [``](#idea-plugin__actions__action__override-text)
- [``](#idea-plugin__actions__group__reference)
- [``](#idea-plugin__actions__action__add-to-group)
- [``](#idea-plugin__actions__group__separator)
- [``](#idea-plugin__actions__action__add-to-group)
- [``](#idea-plugin__actions__group__reference)
- [``](#idea-plugin__actions__action__add-to-group)
- [``](#idea-plugin__applicationListeners)
- [``](#idea-plugin__applicationListeners__listener)
- [``](#idea-plugin__projectListeners)
- [``](#idea-plugin__applicationListeners__listener)
## `idea-plugin`
{#idea-plugin}
The plugin.xml file root element.
{type="narrow"}
Required
: **yes**
{type="narrow"}
Attributes
:
- `url` _(optional; ignored in an [additional config file](#additional-plugin-configuration-files))_
The link to the plugin homepage displayed on the plugin page in
the [JetBrains Marketplace](https://plugins.jetbrains.com).
- `require-restart` _(optional)_
The boolean value determining whether the plugin installation, update, or uninstallation requires an IDE restart
(see [Dynamic Plugins](dynamic_plugins.md) for details).
Default value: `false`.
Children
:
- [``](#idea-plugin__actions)
- [``](#idea-plugin__applicationListeners)
- [``](#idea-plugin__change-notes)
- [``](#idea-plugin__depends)
- [``](#idea-plugin__description)
- [``](#idea-plugin__extensionPoints)
- [``](#idea-plugin__extensions)
- [``](#idea-plugin__id)
- [``](#idea-plugin__idea-version)
- [``](#idea-plugin__incompatible-with)
- [``](#idea-plugin__name)
- [``](#idea-plugin__product-descriptor)
- [``](#idea-plugin__projectListeners)
- [``](#idea-plugin__resource-bundle)
- [``](#idea-plugin__vendor)
- [``](#idea-plugin__version)
- [``](#idea-plugin__application-components) ![Deprecated][deprecated]
- [``](#idea-plugin__module-components) ![Deprecated][deprecated]
- [``](#idea-plugin__project-components) ![Deprecated][deprecated]
### `id`
{#idea-plugin__id}
A unique identifier of the plugin.
It should be a fully qualified name similar to Java packages and must not collide with the ID of existing plugins.
The ID is a technical value used to identify the plugin in the IDE and [JetBrains Marketplace](https://plugins.jetbrains.com).
Please use characters, numbers, and `'.'`/`'-'`/`'_'` symbols only and keep it reasonably short.
> Make sure to pick a stable ID, as the value cannot be changed later after public release.
>
{style="warning"}
{type="narrow"}
Required
: no; ignored in an [additional config file](#additional-plugin-configuration-files)
**It is highly recommended to set in plugin.xml file.**
The element can be skipped in the source plugin.xml file if the Gradle plugin `patchPluginXml` task
([2.x](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml),
[1.x](tools_gradle_intellij_plugin.md#tasks-patchpluginxml))
is enabled and configured.
Default value
: Value of the [``](#idea-plugin__name) element.
Example
:
```xml
com.example.framework
```
### `name`
{#idea-plugin__name}
**Reference:** [JetBrains Marketplace: Plugin Name](https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html#plugin-name)
The user-visible plugin display name (Title Case).
{type="narrow"}
Required
: **yes**; ignored in an [additional config file](#additional-plugin-configuration-files)
Example
:
```xml
My Framework Support
```
### `version`
{#idea-plugin__version}
**Reference:** [JetBrains Marketplace: Semantic Versioning](https://plugins.jetbrains.com/docs/marketplace/semver.html)
The plugin version displayed in the Plugins settings dialog and on the
[JetBrains Marketplace](https://plugins.jetbrains.com) plugin page.
Plugins uploaded to the JetBrains Marketplace must follow semantic versioning.
{type="narrow"}
Required
: **yes**; ignored in an [additional config file](#additional-plugin-configuration-files)
The element can be skipped in the source plugin.xml file if the Gradle plugin `patchPluginXml` task
([2.x](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml),
[1.x](tools_gradle_intellij_plugin.md#tasks-patchpluginxml))
is enabled and configured.
Example
:
```xml
1.3.18
```
### `product-descriptor`
{#idea-plugin__product-descriptor}
**Reference:** [JetBrains Marketplace: How to add required parameters for paid plugins](https://plugins.jetbrains.com/docs/marketplace/add-required-parameters.html)
[Paid](https://plugins.jetbrains.com/build-and-market) or
[Freemium](https://plugins.jetbrains.com/docs/marketplace/freemium.html) plugin descriptor.
{type="narrow"}
Required
: only for paid or freemium plugins; ignored in an [additional config file](#additional-plugin-configuration-files)
**Do not add `` element in a free plugin.**
{type="narrow"}
Attributes
:
- `code` _(**required**)_
The plugin product code used in the JetBrains Sales System.
The code must be agreed with JetBrains in advance and follow
[the requirements](https://plugins.jetbrains.com/docs/marketplace/obtain-a-product-code-from-jetbrains.html).
- `release-date` _(**required**)_
Date of the major version release in the `YYYYMMDD` format.
- `release-version` _(**required**)_
A major version in a specific number format, for example, `20242` for the 2024.2 major release.
See [`release-version` constraints](https://plugins.jetbrains.com/docs/marketplace/versioning-of-paid-plugins.html#release-version-constraints) for more details.
- `optional` _(optional)_
The boolean value determining whether the plugin is
a [Freemium](https://plugins.jetbrains.com/docs/marketplace/freemium.html) plugin.
Default value: `false`.
- `eap` _(optional)_
Specifies the boolean value determining whether the plugin is an EAP release.
Default value: `false`.
### `idea-version`
{#idea-plugin__idea-version}
**Reference:** [Build Number Ranges](build_number_ranges.md)
The plugin's range of compatible IntelliJ-based IDE versions.
{type="narrow"}
Required
: **yes**; ignored in an [additional config file](#additional-plugin-configuration-files)
The element can be skipped in the source plugin.xml file if the Gradle plugin `patchPluginXml` task
([2.x](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml),
[1.x](tools_gradle_intellij_plugin.md#tasks-patchpluginxml))
is enabled and configured.
{type="narrow"}
Attributes
:
- `since-build` _(**required**)_
The lowest IDE version compatible with the plugin.
- `until-build` _(optional)_
The highest IDE version compatible with the plugin.
Undefined value declares compatibility with all the IDEs since the version specified by the `since-build`
(also with the future builds that may cause incompatibility errors).
Examples
:
- Compatibility with a specific build number (2021.3.3) and higher versions:
```xml
```
- Compatibility with versions from any of `213` branches to any of `221` branches:
```xml
```
### `vendor`
{#idea-plugin__vendor}
**Reference:** [JetBrains Marketplace: Contacts and Resources](https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html#contacts-and-resources)
The vendor name or organization ID (if created) in the Plugins settings dialog and on
the [JetBrains Marketplace](https://plugins.jetbrains.com) plugin page.
{type="narrow"}
Required
: **yes**; ignored in an [additional config file](#additional-plugin-configuration-files)
{type="narrow"}
Attributes
:
- `url` _(optional)_
The URL to the vendor's homepage.
Supports `https://` and `http://` scheme links.
- `email` _(optional)_
The vendor's email address.
Examples
:
- Personal vendor with an email address provided:
```xml
Joe Doe
```
- Organizational vendor with a website URL and email address provided:
```xml
My Company
```
### `description`
{#idea-plugin__description}
**Reference:** [JetBrains Marketplace: Plugin Description](https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html#plugin-description)
The plugin description displayed on the [JetBrains Marketplace](https://plugins.jetbrains.com) plugin page and in
the Plugins settings dialog.
Simple HTML elements, like text formatting, paragraphs, lists, etc., are allowed and must be wrapped into
`` section.
{type="narrow"}
Required
: **yes**; ignored in an [additional config file](#additional-plugin-configuration-files)
The element can be skipped in the source plugin.xml file if the Gradle plugin `patchPluginXml` task
([2.x](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml),
[1.x](tools_gradle_intellij_plugin.md#tasks-patchpluginxml))
is enabled and configured.
Example
:
```xml
code completion
references
For more information visit the
project site.
]]>
```
### `change-notes`
{#idea-plugin__change-notes}
**Reference:** [JetBrains Marketplace: Change Notes](https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html#change-notes)
A short summary of new features, bugfixes, and changes provided with the latest plugin version.
Change notes are displayed on the [JetBrains Marketplace](https://plugins.jetbrains.com) plugin page and in
the Plugins settings dialog.
Simple HTML elements, like text formatting, paragraphs, lists, etc., are allowed and must be wrapped into
`` section.
{type="narrow"}
Required
: no; ignored in an [additional config file](#additional-plugin-configuration-files)
The element can be skipped in the source plugin.xml file if the Gradle plugin `patchPluginXml` task
([2.x](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml),
[1.x](tools_gradle_intellij_plugin.md#tasks-patchpluginxml))
is enabled and configured.
Example
:
```xml
New Features
Feature 1
Feature 2
Bug Fixes
Fixed issue 1
Fixed issue 2
]]>
```
### `depends`
{#idea-plugin__depends}
**Reference:** [Plugin Dependencies](plugin_dependencies.md)
, [Modules Specific to Functionality](plugin_compatibility.md#modules-specific-to-functionality)
Specifies a dependency on another plugin or a module of an IntelliJ Platform-based product.
A single [``](#idea-plugin) element can contain multiple `` elements.
{type="narrow"}
Required
: no; in most cases dependency on the
[platform](plugin_compatibility.md#modules-available-in-all-products)
module is needed
{type="narrow"}
Attributes
:
- `optional` _(optional)_
Boolean value defining whether the dependency is optional to load the plugin in the IDE.
If the dependency plugin is not installed in the current IDE, and `optional` is:
- `true` - the plugin will be loaded
- `false` (default) - the plugin will not be loaded
- `config-file` _(required when `optional` is `true`)_
Relative path to an
[additional configuration file](#additional-plugin-configuration-files),
loaded only if the dependency plugin is installed in the current IDE.
Examples
:
- Required plugin dependency:
```xml
com.example.dependencypluginid
```
- Required dependency on the IntelliJ IDEA Java Module:
```xml
com.intellij.modules.java
```
- Optional plugin dependency:
```xml
com.example.dependencypluginid
```
- Required module dependency with additional configuration:
```xml
com.intellij.modules.java
```
- Optional module dependency with additional configuration:
```xml
org.jetbrains.kotlin
```
### `incompatible-with`
{#idea-plugin__incompatible-with}
**Reference:** [Declaring Incompatibility with Module](plugin_compatibility.md#declaring-incompatibility-with-module)
Declares incompatibility with a provided module.
{type="narrow"}
Required
: no; ignored in an [additional config file](#additional-plugin-configuration-files)
Example
:
```xml
com.intellij.modules.appcode.ide
```
### `extensions`
{#idea-plugin__extensions}
**Reference:** [Extensions](plugin_extensions.md)
Defines the plugin extensions.
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `defaultExtensionNs` _(optional)_
Default extensions namespace.
It allows skipping the common prefix in fully qualified extension point names.
Usually, the `com.intellij` namespace is used when the plugin implements IntelliJ Platform extensions.
Children
:
The children elements are registrations of instances
of [extension points](#idea-plugin__extensionPoints__extensionPoint) provided by the IntelliJ Platform or plugins.
An extension element name is defined by its extension point via
`name`
or `qualifiedName` attributes.
An extension element attributes depend on the extension point implementation, but all extensions support basic attributes:
`id`, `order`,
and `os`.
Examples
:
- Extensions' declaration with a default namespace:
```xml
```
- Extensions' declaration using the fully qualified extension name:
```xml
```
#### An Extension
{#idea-plugin__extensions__-}
An extension instance registered under [``](#idea-plugin__extensions).
Listed attributes are basic attributes available for all extensions.
The list of actual attributes can be longer depending on the extension point implementation.
{type="narrow"}
Attributes
:
- `id` _(optional)_
Unique extension identifier.
It allows for referencing an extension in other attributes, for example, in
`order`.
To not clash with other plugins defining extensions with the same identifier,
consider prepending the identifier with a prefix related to the plugin [``](#idea-plugin__id) or
[``](#idea-plugin__name), for example, `id="com.example.myplugin.myExtension"`.
- `order` _(optional)_
Allows for ordering the extension relative to other instances of the same extension point.
Supported values:
- `first` - orders the extension as first.
It is not guaranteed that the extension will be the first if multiple extensions are defined as `first`.
- `last` - orders the extension as last.
It is not guaranteed that the extension will be the last if multiple extensions are defined as `last`.
- `before extension_id` - orders the extension before an extension with
the given `id`
- `after extension_id` - orders the extension after an extension with
the given `id`
Values can be combined, for example, `order="after extensionY, before extensionX"`.
- `os` _(optional)_
Allows restricting an extension to a given OS.
Supported values:
- `freebsd`
- `linux`
- `mac`
- `unix`
- `windows`
For example, `os="windows"` registers the extension on Windows only.
### `extensionPoints`
{#idea-plugin__extensionPoints}
**Reference:** [Extension Points](plugin_extension_points.md)
Extension points defined by the plugin.
{type="narrow"}
Required
: no
Children
:
- [``](#idea-plugin__extensionPoints__extensionPoint)
#### `extensionPoint`
{#idea-plugin__extensionPoints__extensionPoint}
**Reference:** [Declaring Extension Points](plugin_extension_points.md#declaring-extension-points)
A single extension point entry of the [``](#idea-plugin__extensionPoints) defined by the plugin.
A single [``](#idea-plugin__extensionPoints) element can contain multiple `` elements.
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `name` _(`name` or `qualifiedName` is **required**)_
The extension point name that should be unique in the scope of the plugin, e.g., `myExtension`.
The fully qualified name of the extension point is built at runtime by prepending the value of the `name`
attribute with the plugin [``](#idea-plugin__id) + `.` prefix.
Example: when the `name` is `myExtension` and plugin ID is `com.example.myplugin`, the fully qualified name of
the EP will be `com.example.myplugin.myExtension`.
Only one of the `name` and
`qualifiedName` attributes can be
specified.
- `qualifiedName` _(`name` or `qualifiedName` is **required**)_
The fully qualified name of the extension point.
It should be unique between different plugins, and it is recommended to include a plugin ID to guarantee uniqueness,
e.g., `com.example.myplugin.myExtension`.
Only one of the `name` and `qualifiedName` attributes can be specified.
- `interface` _(`interface` or `beanClass` is **required**)_
The fully qualified name of the interface to be implemented for extending the plugin's functionality.
Only one of the `interface` and `beanClass` attributes can be specified.
- `beanClass` _(`interface` or `beanClass` is **required**)_
The fully qualified name of the extension point bean class providing additional information to the plugin.
The bean class specifies one or several properties annotated with the
[`@Attribute`](%gh-ic%/platform/util/src/com/intellij/util/xmlb/annotations/Attribute.java)
annotation.
Note that bean classes do not follow the JavaBean standard.
Implement
[`PluginAware`](%gh-ic%/platform/extensions/src/com/intellij/openapi/extensions/PluginAware.java)
to obtain information about the plugin providing the actual extension (see [Error Handling](plugin_extension_points.md#error-handling)).
Only one of the `interface` and `beanClass` attributes can be specified.
- `dynamic` _(optional)_
Boolean value defining whether the extension point meets the requirements to be
[dynamic](plugin_extension_points.md#dynamic-extension-points),
which is a prerequisite for [dynamic plugins](dynamic_plugins.md).
Default value: `false`.
- `area` _(optional)_
The scope in which the [extension](plugin_extensions.md) is
instantiated.
Allowed values:
- `IDEA_APPLICATION` _(default)_
- `IDEA_PROJECT`
- `IDEA_MODULE` (**deprecated**)
**It is strongly recommended not to introduce new project- and module-level extension points.**
If an extension point needs to operate on a `Project` or `Module` instance, declare an application-level extension
point and pass the instance as a method parameter.
Children
:
- [``](#idea-plugin__extensionPoints__extensionPoint__with)
##### `with`
{#idea-plugin__extensionPoints__extensionPoint__with}
Specifies the required parent type for class names provided in extension point tags or attributes.
A single [``](#idea-plugin__extensionPoints__extensionPoint) element can contain
multiple `` elements.
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `tag` _(`tag` or `attribute` is **required**)_
The name of the tag holding the fully qualified name of the class which parent type will be limited
by the type provided in the `implements` attribute.
Only one of the `tag` and `attribute` attributes can be specified.
- `attribute` _(`tag` or `attribute` is **required**)_
The name of the attribute holding the fully qualified name of the class which parent type will be limited
by the type provided in the `implements` attribute.
Only one of the `tag` and `attribute` attributes can be specified.
- `implements` _(**required**)_
The fully qualified name of the parent type limiting the type provided in the place specified by
`tag` or
`attribute`.
Example
:
An extension point which restricts the type provided in a `myClass` attribute to be an instance
of `com.example.ParentType`, and the type provided in a `someClass` element to be an instance
of `java.lang.Comparable`:
```xml
```
When using the above extension point, an implementation could be registered as follows:
```xml
com.example.MyComparable
```
where:
- `com.example.MyCustomType` must be a subtype of `com.example.ParentType`
- `com.example.MyComparable` must be a subtype of `java.lang.Comparable`
### `resource-bundle`
{#idea-plugin__resource-bundle}
A resource bundle to be used with message key attributes in extension declarations and for
[action and group localization](action_system.md#localizing-actions-and-groups).
A single [``](#idea-plugin) element can contain multiple `` elements.
{type="narrow"}
Required
: no
Example
:
To load the content of messages/Bundle.properties bundle, declare:
```xml
messages.Bundle
```
### `actions`
{#idea-plugin__actions}
**Reference:** [Actions](action_system.md)
Defines the plugin actions.
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `resource-bundle` _(optional; available since 2020.1)_
Defines the dedicated actions resource bundle.
See [Localizing Actions and Groups](action_system.md#localizing-actions-and-groups)
for more details.
Children
:
- [``](#idea-plugin__actions__action)
- [``](#idea-plugin__actions__group)
- [``](#idea-plugin__actions__group__reference)
Example
:
```xml
```
#### `action`
{#idea-plugin__actions__action}
**Reference:** [Registering Actions in plugin.xml](action_system.md#registering-actions-in-pluginxml)
A single action entry of the [``](#idea-plugin__actions) implemented by the plugin.
A single `` element can contain multiple `` elements.
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `id` _(optional; defaults to the action class short name if not specified)_
A unique action identifier.
It is recommended to specify the `id` attribute explicitly.
The action identifier must be unique across different plugins.
To ensure uniqueness, consider prepending it with the value of the plugin's [``](#idea-plugin__id).
- `class` _(**required**)_
The fully qualified name of the action implementation class.
- `text` _(**required** if the action is not
[localized](action_system.md#localizing-actions-and-groups))_
The default long-version text to be displayed for the action (tooltip for toolbar button or text for menu item).
- `description` _(optional)_
The text which is displayed in the status bar when the action is focused.
- `icon` _(optional)_
The icon that is displayed on the toolbar button or next to the action menu item.
See [Working with Icons](icons.md) for more information
about defining and using icons.
- `use-shortcut-of` _(optional)_
The ID of the action whose keyboard shortcut this action will use.
Children
:
- [``](#idea-plugin__actions__action__abbreviation)
- [``](#idea-plugin__actions__action__add-to-group)
- [``](#idea-plugin__actions__action__keyboard-shortcut)
- [``](#idea-plugin__actions__action__mouse-shortcut)
- [``](#idea-plugin__actions__action__override-text)
- [``](#idea-plugin__actions__action__synonym)
Examples
:
- Action declaring explicit `text`:
```xml
```
- Action without the `text` attribute must use the texts from the resource bundle declared with
the [``](#idea-plugin__resource-bundle) element,
or the `resource-bundle` attribute of
the [``](#idea-plugin__actions) element:
```xml
```
##### `add-to-group`
{#idea-plugin__actions__action__add-to-group}
Specifies that the action should be added to an existing [``](#idea-plugin__actions__group).
A single action can be added to multiple groups.
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `group-id` _(**required**)_
Specifies the ID of the [``](#idea-plugin__actions__group) to which the action is added.
The group must be an implementation of the
[`DefaultActionGroup`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/actionSystem/DefaultActionGroup.java)
class.
- `anchor` _(optional)_
Specifies the position of the action relative to other actions.
Allowed values:
- `first` - the action is placed as the first in the group
- `last` _(default)_ - the action is placed as the last in the group
- `before` - the action is placed before the action specified by the `relative-to-action` attribute
- `after` - the action is placed after the action specified by the `relative-to-action` attribute
- `relative-to-action` _(**required** if `anchor` is `before`/`after`)_
The action before or after which the current action is inserted.
Example
:
```xml
```
##### `keyboard-shortcut`
{#idea-plugin__actions__action__keyboard-shortcut}
Specifies the keyboard shortcut for the action.
A single action can have several keyboard shortcuts.
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `keymap` _(**required**)_
Specifies the keymap for which the action shortcut is active.
IDs of the standard keymaps are defined as constants in the
[KeymapManager](%gh-ic%/platform/platform-api/src/com/intellij/openapi/keymap/KeymapManager.java)
class.
- `first-keystroke` _(**required**)_
Specifies the first keystroke of the action shortcut.
The keystrokes are specified according to the regular Swing rules.
- `second-keystroke` _(optional)_
Specifies the second keystroke of the action shortcut.
- `remove` _(optional)_
Removes a shortcut from the specified action.
- `replace-all` _(optional)_
Removes all keyboard and mouse shortcuts from the specified action before adding
the specified shortcut.
Examples
:
- Add the first and second keystrokes to all keymaps:
```xml
```
- Remove the given shortcut from the _Mac OS X_ keymap:
```xml
```
- Remove all existing keyboard and mouse shortcuts and register one for the _Mac OS X 10.5+_ keymap only:
```xml
```
##### `mouse-shortcut`
{#idea-plugin__actions__action__mouse-shortcut}
Specifies the mouse shortcut for the action.
A single action can have several mouse shortcuts.
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `keymap` _(**required**)_
Specifies the keymap for which the action shortcut is active.
IDs of the standard keymaps are defined as constants in the
[KeymapManager](%gh-ic%/platform/platform-api/src/com/intellij/openapi/keymap/KeymapManager.java)
class.
- `keystroke` _(**required**)_
Specifies the clicks and modifiers for the action.
It is defined as a sequence of words separated by spaces:
- modifier keys: `shift`, `control`, `meta`, `alt`, `altGraph`
- mouse buttons: `button1`, `button2`, `button3`
- button double-click: `doubleClick`
- `remove` _(optional)_
Removes a shortcut from the specified action.
- `replace-all` _(optional)_
Removes all keyboard and mouse shortcuts from the specified action before adding
the specified shortcut.
Examples
:
- Add the shortcut to all keymaps:
```xml
```
- Remove the given shortcut from the _Mac OS X_ keymap:
```xml
```
- Remove all existing keyboard and mouse shortcuts and register one for the _Mac OS X 10.5+_ keymap only:
```xml
```
##### `override-text`
{#idea-plugin__actions__action__override-text}
Defines an alternate menu action or group text depending on context: menu location, toolbar, and other.
{type="narrow"}
Supported
:
2020.1+ for actions
2020.3+ for groups
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `place` _(**required**)_
Declares where the alternate text should be used.
- `text` _(`text` or `use-text-of-place` is **required**)_
Defines the text to be displayed for the action.
- `use-text-of-place` _(`text` or `use-text-of-place` is **required**)_
Defines a location whose text should be displayed for this action.
Examples
:
- Explicitly overridden text:
```xml
```
- Overridden text reused from the `MainMenu` place:
```xml
```
##### `synonym`
{#idea-plugin__actions__action__synonym}
Defines an alternative text for searching the action in Help | Find Action... or
Navigate | Search Everywhere popups.
A single action can have multiple synonyms.
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `key` _(`key` or `text` is **required**)_
The key of the synonym text provided in a [message bundle](action_system.md#localizing-actions-and-groups).
- `text` _(`key` or `text` is **required**)_
The synonym text.
Example
:
```xml
```
##### `abbreviation`
{#idea-plugin__actions__action__abbreviation}
Defines an abbreviation for searching the action in Help | Find Action... or
Navigate | Search Everywhere popups.
A single action can have multiple abbreviations.
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `value` _(**required**)_
The abbreviation value.
Example
:
```xml
```
#### `group`
{#idea-plugin__actions__group}
**Reference:** [Grouping Actions](action_system.md#grouping-actions)
Defines an action group.
The [``](#idea-plugin__actions__action), `` and [``](#idea-plugin__actions__group__separator) elements defined inside the group are automatically included in it.
The `` elements can be nested.
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `id` _(**required**)_
A unique group identifier.
The group identifier must be unique between different plugins.
Thus, it is recommended to prepend it with the value of the plugin [``](#idea-plugin__id).
- `class` _(optional)_
The fully qualified name of the group implementation class.
If not specified,
[`DefaultActionGroup`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/actionSystem/DefaultActionGroup.java)
is used.
- `text` _(**required** if the `popup` is `true` and the group is not
[localized](action_system.md#localizing-actions-and-groups))_
The default long-version text to be displayed for the group (text for the menu item showing the submenu).
- `description` _(optional)_
The text which is displayed in the status bar when the group is focused.
- `icon` _(optional)_
The icon that is displayed next to the group menu item.
See [Working with Icons](icons.md) for more information about defining
and using icons.
- `popup` _(optional)_
Boolean flag defining whether the group items are presented in the submenu popup.
- `true` - group actions are placed in a submenu
- `false` _(default)_ - actions are displayed as a section of the same menu delimited by separators
- `compact` _(optional)_
Boolean flag defining whether disabled actions within this group are hidden.
If the value is:
- `true` - disabled actions are hidden
- `false` _(default)_ - disabled actions are visible
- `use-shortcut-of` _(optional)_
The ID of the action whose keyboard shortcut this group will use.
- `searchable` _(optional; available since 2020.3)_
Boolean flag defining whether the group is displayed in Help | Find Action...
or Navigate | Search Everywhere popups.
Default value: `true`.
Children
:
- [``](#idea-plugin__actions__action)
- [``](#idea-plugin__actions__action__add-to-group)
- [``](#idea-plugin__actions__group)
- [``](#idea-plugin__actions__action__override-text)
- [``](#idea-plugin__actions__group__reference)
- [``](#idea-plugin__actions__group__separator)
Examples
:
- Group declaring explicit `text`:
```xml
```
- A popup group without the `text` attribute must use the texts from the resource bundle declared with
the [``](#idea-plugin__resource-bundle) element,
or the `resource-bundle` attribute
of the [``](#idea-plugin__actions) element:
```xml
```
- A group with custom implementation and icon:
```xml
```
##### `reference`
{#idea-plugin__actions__group__reference}
Allows adding an existing action to the group.
The element can be used directly under the [``](#idea-plugin__actions) element, or in
the [``](#idea-plugin__actions__group) element.
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `ref` _(**required**)_
The ID of the action to add to a group.
- `id` _(optional)_
**_Deprecated_**: Use `ref` instead.
The ID of the action to add to a group.
Children
:
- [``](#idea-plugin__actions__action__add-to-group)
Examples
:
- An action reference in a group:
```xml
```
- An action reference registered directly in the [``](#idea-plugin__actions) element:
```xml
```
##### `separator`
{#idea-plugin__actions__group__separator}
Defines a separator between actions in a group.
The element can be used directly under the [``](#idea-plugin__actions) element with the child
[``](#idea-plugin__actions__action__add-to-group) element defining the target group, or in the
[``](#idea-plugin__actions__group) element.
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `text` _(optional)_
Text displayed on the separator.
Separator text is displayed only in specific contexts such as popup menus, toolbars, etc.
- `key` _(optional)_
The [message key]([message key](https://plugins.jetbrains.com/docs/intellij/basic-action-system.html#localizing-actions-and-groups)) for the separator text.
The message bundle for use should be registered via the `resource-bundle` attribute of
the [``](#idea-plugin__actions) element.
The attribute is ignored if the `text` attribute is specified.
Children
:
- [``](#idea-plugin__actions__action__add-to-group)
Examples
:
- A separator dividing two actions in a group:
```xml
```
- A separator registered directly in the [``](#idea-plugin__actions) element:
```xml
```
- A separator with a defined text:
```xml
```
- A separator with a text defined by a message key:
```xml
```
### `applicationListeners`
{#idea-plugin__applicationListeners}
**Reference:** [Defining Application-Level Listeners](plugin_listeners.md#defining-application-level-listeners)
Defines the application-level listeners.
{type="narrow"}
Required
: no
Children
:
- [``](#idea-plugin__applicationListeners__listener)
#### `listener`
{#idea-plugin__applicationListeners__listener}
**Reference:** [Listeners](plugin_listeners.md)
Defines a single application or project-level listener.
A single [``](#idea-plugin__applicationListeners) or
[``](#idea-plugin__projectListeners) can contain multiple `` elements.
{type="narrow"}
Required
: no
{type="narrow"}
Attributes
:
- `topic` _(**required**)_
The fully qualified name of the listener interface corresponding to the type of received events.
- `class` _(**required**)_
The fully qualified name of the class implementing the listener interface that receives and handles the events.
- `os` _(optional; available since 2020.1)_
Restricts listener instantiation to a specific operating system.
Allowed values:
- `freebsd`
- `mac`
- `linux`
- `unix`
- `windows`
- `activeInTestMode` _(optional)_
Boolean flag defining whether the listener should be instantiated in test mode.
Default value: `true`.
- `activeInHeadlessMode` _(optional)_
Boolean flag defining whether the listener should be instantiated in headless mode.
Default value: `true`.
Example
:
```xml
```
### `projectListeners`
{#idea-plugin__projectListeners}
**Reference:** [Defining Project-Level Listeners](plugin_listeners.md#defining-project-level-listeners)
Defines the project-level listeners.
{type="narrow"}
Required
: no
Children
:
- [``](#idea-plugin__applicationListeners__listener)
### `application-components`
{#idea-plugin__application-components collapsible="true" initial-collapse-state="collapsed"}
> Do not use it in new plugins.
> See [Components](plugin_components.md) for the migration guide.
>
{style="warning"}
Defines a list of application [components](plugin_components.md).
{type="narrow"}
Deprecated
:
since 2020.1
{type="narrow"}
Required
: no
Children
:
- [``](#idea-plugin__application-components__component) ![Deprecated][deprecated]
#### `component`
{#idea-plugin__application-components__component}
> Do not use it in new plugins.
> See [Components](plugin_components.md) for the migration guide.
>
{style="warning"}
Defines a single application, project, or
module [component](plugin_components.md).
A single [``](#idea-plugin__application-components),
[``](#idea-plugin__project-components), or [``](#idea-plugin__module-components)
element can contain multiple `` elements.
{type="narrow"}
Deprecated
:
since 2020.1
{type="narrow"}
Required
: no
Children
:
- [``](#idea-plugin__application-components__component__headless-implementation-class) ![Deprecated][deprecated]
- [``](#idea-plugin__application-components__component__implementation-class) ![Deprecated][deprecated]
- [``](#idea-plugin__application-components__component__interface-class) ![Deprecated][deprecated]
- [``](#idea-plugin__application-components__component__loadForDefaultProject) ![Deprecated][deprecated]
- [`