diff --git a/_SUMMARY.md b/_SUMMARY.md index f00cbc14f..a58020940 100644 --- a/_SUMMARY.md +++ b/_SUMMARY.md @@ -32,6 +32,7 @@ * [Plugin Actions](basics/plugin_structure/plugin_actions.md) * [Plugin Services](basics/plugin_structure/plugin_services.md) * [Plugin Configuration File](basics/plugin_structure/plugin_configuration_file.md) + * [Plugin Icon](basics/plugin_structure/plugin_icon_file.md) * [Plugin Dependencies](basics/plugin_structure/plugin_dependencies.md) * [Kotlin for Plugin Developers](tutorials/kotlin.md) * [IDE Development Instances](basics/ide_development_instance.md) diff --git a/basics/getting_started/deploying_plugin/img/jar_location.png b/basics/getting_started/deploying_plugin/img/jar_location.png index b179bf747..edb7774ac 100644 Binary files a/basics/getting_started/deploying_plugin/img/jar_location.png and b/basics/getting_started/deploying_plugin/img/jar_location.png differ diff --git a/basics/plugin_structure/img/kotlin40.svg b/basics/plugin_structure/img/kotlin40.svg new file mode 100644 index 000000000..f50ca63e3 --- /dev/null +++ b/basics/plugin_structure/img/kotlin40.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/basics/plugin_structure/img/resource_directory_structure.png b/basics/plugin_structure/img/resource_directory_structure.png new file mode 100644 index 000000000..eded91e59 Binary files /dev/null and b/basics/plugin_structure/img/resource_directory_structure.png differ diff --git a/basics/plugin_structure/plugin_content.md b/basics/plugin_structure/plugin_content.md index 1a79340a3..e84ff95e1 100644 --- a/basics/plugin_structure/plugin_content.md +++ b/basics/plugin_structure/plugin_content.md @@ -6,7 +6,12 @@ There are two possible ways of organizing plugin content: 1. A plugin consisting of one `.jar` file placed in the plugins directory: - The archive should contain the configuration file (`META-INF/plugin.xml`) and classes that implement the plugin functionality. The configuration file specifies the plugin name, description, version, vendor, the supported IntelliJ IDEA version, plugin components, actions and action groups, and action user interface placement. + The archive should contain the configuration file (`META-INF/plugin.xml`), + plugin icon files (`META-INF/pluginIcon*.svg`), + and the classes that implement the plugin functionality. The configuration file + specifies the plugin name, description, version, vendor, the supported IntelliJ IDEA version, + plugin components, actions and action groups, and action user interface placement. + See the [Plugin Icon File](plugin_icon_file.md) page for more information about plugin icon svg files. ``` .IntelliJIDEAx0/ @@ -17,6 +22,8 @@ There are two possible ways of organizing plugin content: ... META-INF/ plugin.xml + pluginIcon.svg + pluginIcon_dark.svg ``` @@ -35,6 +42,8 @@ There are two possible ways of organizing plugin content: ... META-INF/ plugin.xml + pluginIcon.svg + pluginIcon_dark.svg ``` All jars from the `lib` folder are automatically added to the classpath. diff --git a/basics/plugin_structure/plugin_icon_file.md b/basics/plugin_structure/plugin_icon_file.md new file mode 100644 index 000000000..25c896d16 --- /dev/null +++ b/basics/plugin_structure/plugin_icon_file.md @@ -0,0 +1,47 @@ +--- +title: Plugin Icon +--- + +Beginning in version 2018.3, the IntelliJ Platform supports representing a plugin with an icon. +A _Plugin Icon_ is intended to be a unique representation of a plugin's functionality, technology, or +company. + +Plugin Icons are shown in the Settings/Preferences [Plugin Manager](https://www.jetbrains.com/help/idea/managing-plugins.html) UI +in JetBrains' products. Plugin Icons also appear in the [Plugins Repository](https://plugins.jetbrains.com/), +and also in [MarketPlace](https://plugins.jetbrains.com/marketplace). + +### Plugin Icon File Format +All Plugin Icon images must be provided in SVG format. +Plugin Icons will be displayed in 40px by 40px and 80px by 80px size. However, _only one +size icon_ should be supplied because the IntelliJ Platform will automatically +scale the image as needed. + +| Icon Size | Example SVG Icon | +| ------------- | ------------- | +| 40x40 | ![Kotlin Plugin Icon](img/kotlin40.svg) | + +### Plugin Icon File Naming Convention +Plugin Icon files are named according to the following conventions: +* `pluginIcon.svg` for use with the default (light) JetBrains IDE theme +* `pluginIcon_dark.svg` for use with the Darcula JetBrains IDE theme + +### Adding Plugin Icons to a Plugin Project +The Plugin Icon files must be in the `META-INF` folder of the plugin distribution file, +i.e. the *.jar or *.zip file you upload to the plugin repository and install into +a JetBrains IDE. + +To include Plugin Icons in your distribution file, place the Plugin Icon files +into a plugin project's `resources/META-INF` folder. Note this requirement +is the same regardless of using DevKit or Gradle for developing a plugin. For example: + +![Plugin Icons in META-INF folder](img/resource_directory_structure.png) + +### Plugin Icons API +If you need access to existing Plugin Icons you can acquire +them through the Plugin Repository using the following URL format: +`https://plugins.jetbrains.com/api/icon?pluginId=${PLUGIN_XMLID}&theme=${DEFAULT|DARCULA}` +Note the`theme` parameter may be omitted when you are retrieving an icon for a DEFAULT +theme. + +An example URL to retrieve the Fortran Plugin Icon would be: +`https://plugins.jetbrains.com/api/icon?pluginId=org.jetbrains.fortran&theme=DEFAULT` \ No newline at end of file diff --git a/tutorials/build_system/prerequisites.md b/tutorials/build_system/prerequisites.md index b9aeba33d..cefe2a60e 100644 --- a/tutorials/build_system/prerequisites.md +++ b/tutorials/build_system/prerequisites.md @@ -87,7 +87,7 @@ This will clean any existing IntelliJ IDEA configuration files and generate a ne ### 1.5 Running a Simple Plugin Now add a new `HelloAction` class to the Java folder, and `plugin.xml` and `pluginIcon.svg` files in the `META-INF` folder. -for more information about `pluginIcon.svg` files, see the [Plugin Icon File](/basics/plugin_structure/plugin_icon_file.md) section. +For more information about `pluginIcon.svg` files, see the [Plugin Icon](/basics/plugin_structure/plugin_icon_file.md) page. Gradle directory structure