From f79ec3f00306f57a661c3f7c68b08335333cdbf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 1 Aug 2023 09:02:46 +0200 Subject: [PATCH] tool_windows.md: note ToolWindowManager.invokeLater --- topics/user_interface_components/tool_windows.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/topics/user_interface_components/tool_windows.md b/topics/user_interface_components/tool_windows.md index c8340131e..bdf70ad7b 100644 --- a/topics/user_interface_components/tool_windows.md +++ b/topics/user_interface_components/tool_windows.md @@ -71,6 +71,8 @@ The second method involves simply calling [`ToolWindowManager.registerToolWindow The method has multiple overloads that can be used depending on the task. When using an overload that takes a component, the component becomes the first content (tab) displayed in the tool window. +Always use [`ToolWindowManager.invokeLater()`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/wm/ToolWindowManager.kt) instead of "plain" `Application.invokeLater()` when scheduling EDT tasks related to tool windows (see [](general_threading_rules.md)). + ## Contents (Tabs) Displaying the contents of many tool windows requires access to [indexes](indexing_and_psi_stubs.md).