From fb247b1b6588898c09261cfa3bc69595e6c54c4f Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Fri, 13 Feb 2026 16:57:08 +0100 Subject: [PATCH] [rdct] IJPL-112 IJPL-217259 ensure ToolWindow content manager is created under correct ClientId GitOrigin-RevId: 0028008cbbe215ac8b49693a4ce3d486a0e6daa8 --- .../src/com/intellij/openapi/wm/impl/ToolWindowImpl.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowImpl.kt b/platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowImpl.kt index 264f6da7b202..246ac7dda4b5 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowImpl.kt +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowImpl.kt @@ -3,6 +3,8 @@ package com.intellij.openapi.wm.impl +import com.intellij.codeWithMe.ClientId +import com.intellij.codeWithMe.ClientId.Companion.withExplicitClientId import com.intellij.icons.AllIcons import com.intellij.ide.DataManager import com.intellij.ide.IdeBundle @@ -133,6 +135,7 @@ private val LOG = logger() private var isAvailable: Boolean = true, private var stripeTitleProvider: Supplier<@NlsContexts.TabTitle String>, ) : ToolWindowEx { + private val toolWindowClientId = ClientId.current private val contentFactory: AtomicReference = AtomicReference(contentFactory) @JvmField @@ -185,7 +188,9 @@ private val LOG = logger() private var tabsSplittingAllowed: Boolean = false private val contentManager = SynchronizedClearableLazy { - val result = createContentManager() + val result = withExplicitClientId(toolWindowClientId) { + createContentManager() + } if (toolWindowManager.isNewUi) { result.addContentManagerListener(UpdateBackgroundContentManager()) }