ui_faq.md: Customizing Existing Icons

This commit is contained in:
Yann Cébron 2025-05-08 15:17:33 +02:00
parent fb8581b8de
commit 9ad5494ec4
2 changed files with 11 additions and 1 deletions

View File

@ -49,7 +49,6 @@ for programmatic registration.
## User Interface ## User Interface
* [How do I enable file name completion in a combo box?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206139509-Combobox-with-Browse-Button-and-Autocompletion-) * [How do I enable file name completion in a combo box?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206139509-Combobox-with-Browse-Button-and-Autocompletion-)
* [How do I provide a custom icon for files/PSI elements?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206143779-Is-it-possible-to-change-icon-of-file-in-Project-view-)
## General ## General

View File

@ -78,6 +78,17 @@ If you use the insets elsewhere, you need to manually call `JBInsets.update()` i
## Icons ## Icons
### Customizing Existing Icons
Plugins may need to override icons for existing elements, for example, for XML/JSON configuration files related its functionality.
Use [`FileIconProvider`](%gh-ic%/platform/core-api/src/com/intellij/ide/FileIconProvider.java)
registered in <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.fileIconProvider"/></include>
to provide custom icons for [](virtual_file.md).
For [PSI elements](psi.md), implement [`IconProvider`](%gh-ic%/platform/core-api/src/com/intellij/ide/IconProvider.java)
and register in <include from="snippets.topic" element-id="ep"><var name="ep" value="com.intellij.iconProvider"/></include>.
### Progress Placeholder ### Progress Placeholder
[`LoadingDecorator`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/LoadingDecorator.kt) provides "loading" placeholder panel. [`LoadingDecorator`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/LoadingDecorator.kt) provides "loading" placeholder panel.