--- title: Plugin Extensions and Extension Points --- The *IntelliJ Platform* provides the concept of _extensions_ and _extension points_ that allows a plugin to interact with other plugins or with the IDE itself. ## Extension points If you want your plugin to allow other plugins to extend its functionality, in the plugin, you must declare one or several _extension points_. Each extension point defines a class or an interface that is allowed to access this point. ## Extensions If you want your plugin to extend the functionality of other plugins or the *IntelliJ Platform*, you must declare one or several _extensions_. ## How to declare extensions and extension points You can declare extensions and extension points in the plugin configuration file `plugin.xml`, within the `` and `` sections, respectively. **To declare an extension point** In the `` section, insert a child element `` that defines the extension point name and the name of a bean class or an interface that is allowed to extend the plugin functionality in the `name`, `beanClass` and `interface` attributes, respectively. To clarify this procedure, consider the following sample section of the plugin.xml file: ```xml ``` * The `interface` attribute sets an interface the plugin that contributes to the extension point must implement. * The `beanClass` attribute sets a bean class that specifies one or several properties annotated with the [@Attribute](upsource:///xml/dom-openapi/src/com/intellij/util/xml/Attribute.java) annotation. The plugin that contributes to the extension point will read those properties from the `plugin.xml` file. To clarify this, consider the following sample `MyBeanClass1` bean class used in the above `plugin.xml` file: ```java public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } } ``` Note that to declare an extension designed to access the `MyExtensionPoint1` extension point, your `plugin.xml` file must contain the `` tag with the `key` and `implementationClass` attributes set to appropriate values (see sample below). **To declare an extension** 1. For the `` element, set the `xmlns` (deprecated) or `defaultExtensionNs` attribute to one of the following values: * `com.intellij`, if your plugin extends the IntelliJ Platform core functionality. * `{ID of a plugin}`, if your plugin extends a functionality of another plugin. 2. Add a new child element to the `` element. The child element name must match the name of the extension point you want the extension to access. 3. Depending on the type of the extension point, do one of the following: * If the extension point was declared using the `interface` attribute, for newly added child element, set the `implementation` attribute to the name of the class that implements the specified interface. * If the extension point was declared using the `beanClass` attribute, for newly added child element, set all attributes annotated with the [@Attribute](upsource:///xml/dom-openapi/src/com/intellij/util/xml/Attribute.java) annotations in the specified bean class. To clarify this procedure, consider the following sample section of the `plugin.xml` file that defines two extensions designed to access the `appStarter` and `applicationConfigurable` extension points in the *IntelliJ Platform* and one extension to access the `MyExtensionPoint1` extension point in a test plugin: ```xml ``` ## How to get the extension points list? To get a list of extension points available in the *IntelliJ Platform* core, consult the `` section of the following XML configuration files: * [`LangExtensionPoints.xml`](upsource:///platform/platform-resources/src/META-INF/LangExtensionPoints.xml) * [`PlatformExtensionPoints.xml`](upsource:///platform/platform-resources/src/META-INF/PlatformExtensionPoints.xml) * [`VcsExtensionPoints.xml`](upsource:///platform/platform-resources/src/META-INF/VcsExtensionPoints.xml) ## Additional Information and Samples For samples plugins and detailed instructions on how to create your plugin that contributes to the IDEA core, refer to Customizing the IDEA Settings Dialog and Creation of Tool Windows.