From 9ad5494ec4b462dcda1324f948e19c6dd10134f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Thu, 8 May 2025 15:17:33 +0200 Subject: [PATCH] ui_faq.md: Customizing Existing Icons --- topics/basics/faq.md | 1 - topics/user_interface_components/ui_faq.md | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/topics/basics/faq.md b/topics/basics/faq.md index 12c444e79..56c558647 100644 --- a/topics/basics/faq.md +++ b/topics/basics/faq.md @@ -49,7 +49,6 @@ for programmatic registration. ## 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 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 diff --git a/topics/user_interface_components/ui_faq.md b/topics/user_interface_components/ui_faq.md index ac48b4062..21fc61360 100644 --- a/topics/user_interface_components/ui_faq.md +++ b/topics/user_interface_components/ui_faq.md @@ -78,6 +78,17 @@ If you use the insets elsewhere, you need to manually call `JBInsets.update()` i ## 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 +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 . + ### Progress Placeholder [`LoadingDecorator`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/LoadingDecorator.kt) provides "loading" placeholder panel.