update_plugins_format.md: add <depends> element description

This commit is contained in:
Karol Lewandowski 2022-08-17 17:51:57 +02:00
parent 2d928d35e8
commit cf27b11dfc

View File

@ -83,17 +83,16 @@ available at this repository.
### Optional updatePlugin.xml Elements
Can additional elements be added to <path>updatePlugins.xml</path>?
Yes, but it's advisable only if needed.
The additional elements will have to be synchronized with each plugin's <path>plugin.xml</path> file.
During plugin installation, the IDE reads the plugin JAR/ZIP file and thereafter displays more information about the plugin.
In some cases, additional information included in <path>updatePlugins.xml</path> might help a user select a plugin when [browsing the custom plugin repository](https://www.jetbrains.com/help/idea/managing-plugins.html#repos) before installation.
The decision on what elements should be included in the file depends on the plugins and repository consumers.
It is recommended to avoid adding unnecessary elements as they will have to be synchronized with each plugin's <path>plugin.xml</path> file.
During plugin installation, the IDE reads the plugin JAR/ZIP file, and thereafter displays more information about the plugin.
What additional information might help a user select a plugin when [browsing the custom plugin repository](https://www.jetbrains.com/help/idea/managing-plugins.html#repos) before installation?
The answer depends on the plugins and repository consumers.
Here are the candidate elements:
The additional candidate elements:
| Element | Effects & Requirements |
|:--------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `<name>`<br/>My Plugin Name<br/>`</name>` | By default the name of the plugin JAR/ZIP file is displayed before installation. <br/>Using the `<name>` element displays the name of the plugin. <br/>Contents should match the `<name>` element contents in the plugins's <path>plugin.xml</path> file to avoid confusion. |
| `<description>`<br/>My plugin is awesome<br/>`</description>` | By default no description for the plugin is displayed before installation. <br/>Using the `<description>` element will cause a description to be displayed before installation. <br/>Contents should match the `<description>` element contents in the plugins's <path>plugin.xml</path> file to avoid confusion. <br/>Optionally, an enclosing `<![CDATA[ ]]>` element can be used if the description needs to contain HTML tags. |
| `<change-notes>`<br/>Added cool feature<br/>`</change-notes>` | By default no change notes for the plugin are displayed before installation. <br/>Using the `<change-notes>` element will cause a description of changes to be displayed before installation. <br/>Contents should match the `<change-notes>` element contents in the plugin's <path>plugin.xml</path> file to avoid confusion. <br/>Optionally, an enclosing `<![CDATA[ ]]>` element can be used if the change notes need to contain HTML tags. |
| Element | Effects & Requirements |
|:--------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `<name>`<br/>My Plugin Name<br/>`</name>` | By default the name of the plugin JAR/ZIP file is displayed before installation. <br/>Using the `<name>` element displays the name of the plugin. <br/>Contents should match the `<name>` element contents in the plugin's <path>plugin.xml</path> file to avoid confusion. |
| `<description>`<br/>My plugin is awesome<br/>`</description>` | By default no description for the plugin is displayed before installation. <br/>Using the `<description>` element will cause a description to be displayed before installation. <br/>Contents should match the `<description>` element contents in the plugin's <path>plugin.xml</path> file to avoid confusion. <br/>Optionally, an enclosing `<![CDATA[ ]]>` element can be used if the description needs to contain HTML tags. |
| `<change-notes>`<br/>Added cool feature<br/>`</change-notes>` | By default no change notes for the plugin are displayed before installation. <br/>Using the `<change-notes>` element will cause a description of changes to be displayed before installation. <br/>Contents should match the `<change-notes>` element contents in the plugin's <path>plugin.xml</path> file to avoid confusion. <br/>Optionally, an enclosing `<![CDATA[ ]]>` element can be used if the change notes need to contain HTML tags. |
| `<depends>`<br/>dependency.plugin.id<br/>`</depends>` | Adding a plugin dependency in the `<depends>` element will cause asking a user about enabling the dependency plugin, if it is installed and disabled in the IDE. A plugin can specify multiple `<depends>` elements. <br/>A plugin entry should include only the dependencies on other plugins that are defined in the plugin's <path>plugin.xml</path> file. The `optional` and `config-file` attributes are ignored and shouldn't be specified. |