1.7 KiB
layout | title |
---|---|
editable | Plugin Structure |
Plugins are the only supported way to extend IDEA functionality. A plugin uses API exposed by IDEA or other plugins to implement its functionality. This document is focused on the plugin system structure and plugin lifecycle. It doesn't specify any other APIs that may be used by plugins.
The following subjects are covered:
Plugin Dependencies
In your plugin, you may depend on classes from other plugins, either bundled, third-party or your own. In order to do so, you need to perform the following two steps:
-
Add the jars of the plugin you're depending on to the classpath of your IntelliJ IDEA SDK. (Note: Don't add the plugin jars as a library: this will fail at runtime because IntelliJ IDEA will load two separate copies of the dependency plugin classes.)
-
Add a tag to your plugin.xml, adding the ID of the plugin you're depending on as the contents of the tag. For example:
<depends>org.jetbrains.idea.maven</depends>
To find out the ID of the plugin you're depending on, locate the META-INF/plugin.xml file inside its jar and check the contents of the tag.