From acaa5c1e303b5b6e51483e31df718bb7625b9093 Mon Sep 17 00:00:00 2001 From: Yuriy Artamonov Date: Tue, 12 Nov 2024 23:16:32 +0100 Subject: [PATCH] [ui] IJPL-157380 `ToolWindowContentUi.NOT_SELECTED_TAB_ICON_TRANSPARENT` is now Experimental (cherry picked from commit 0280e560897cf4884b76182160afe322ebf2b157) IJ-CR-149227 GitOrigin-RevId: 51e79bb41c53a5065383b303f32a67717b924bfe --- platform/platform-impl/api-dump-experimental.txt | 4 ++++ .../openapi/wm/impl/content/ToolWindowContentUi.java | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/platform/platform-impl/api-dump-experimental.txt b/platform/platform-impl/api-dump-experimental.txt index ce049152a104..3c868d88d804 100644 --- a/platform/platform-impl/api-dump-experimental.txt +++ b/platform/platform-impl/api-dump-experimental.txt @@ -336,6 +336,10 @@ f:com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl - *s:setOfflineByDefault(com.intellij.openapi.vfs.VirtualFile,Z):V a:com.intellij.openapi.wm.impl.FrameTitleBuilder - *:getFileTitleAsync(com.intellij.openapi.project.Project,com.intellij.openapi.vfs.VirtualFile,kotlin.coroutines.Continuation):java.lang.Object +f:com.intellij.openapi.wm.impl.content.ToolWindowContentUi +- com.intellij.openapi.actionSystem.UiCompatibleDataProvider +- com.intellij.ui.content.ContentUI +- *sf:NOT_SELECTED_TAB_ICON_TRANSPARENT:com.intellij.openapi.util.Key c:com.intellij.openapi.wm.impl.status.IdeStatusBarImpl - javax.swing.JComponent - com.intellij.openapi.actionSystem.UiDataProvider diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/content/ToolWindowContentUi.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/content/ToolWindowContentUi.java index e9f876851931..018face092c7 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/content/ToolWindowContentUi.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/content/ToolWindowContentUi.java @@ -55,16 +55,17 @@ import java.util.List; import java.util.function.Predicate; public final class ToolWindowContentUi implements ContentUI, UiCompatibleDataProvider { - // when client property is put in toolwindow component, hides toolwindow label + // when client property is put in a toolwindow component, hides toolwindow label public static final @NonNls String HIDE_ID_LABEL = "HideIdLabel"; public static final @NonNls Key ALLOW_DND_FOR_TABS = Key.create("AllowDragAndDropForTabs"); - // when client property is set to true in toolwindow component, the toolbar is always visible in the tool window header + // when client property is set to true in a toolwindow component, the toolbar is always visible in the tool window header public static final @NonNls Key DONT_HIDE_TOOLBAR_IN_HEADER = Key.create("DontHideToolbarInHeader"); private static final @NonNls String TOOLWINDOW_UI_INSTALLED = "ToolWindowUiInstalled"; public static final DataKey SELECTED_CONTENT_TAB_LABEL = DataKey.create("SELECTED_CONTENT_TAB_LABEL"); @ApiStatus.Internal public static final String HEADER_ICON = "HeaderIcon"; - @ApiStatus.Internal public static final Key NOT_SELECTED_TAB_ICON_TRANSPARENT = Key.create("NotSelectedIconTransparent"); + @ApiStatus.Experimental + public static final Key NOT_SELECTED_TAB_ICON_TRANSPARENT = Key.create("NotSelectedIconTransparent"); private final @NotNull ContentManager contentManager; int dropOverIndex = -1; @@ -126,7 +127,7 @@ public final class ToolWindowContentUi implements ContentUI, UiCompatibleDataPro public void contentAdded(@NotNull ContentManagerEvent event) { Content content = event.getContent(); ContentManager manager = content.getManager(); - // merge subContents to main content if they are together inside one content manager + // merge subContents to the main content if they are together inside one content manager if (manager != null && !(content instanceof SingleContentLayout.SubContent)) { List contents = manager.getContentsRecursively(); List mainContents = contents.stream().filter(c -> !(c instanceof SingleContentLayout.SubContent)).toList(); @@ -199,7 +200,7 @@ public final class ToolWindowContentUi implements ContentUI, UiCompatibleDataPro }; contentManager.addContentManagerListener(contentManagerListener); // some tool windows clients can use contentManager.removeAllContents(true) - // - ensure that we don't receive such events if window is already disposed + // - ensure that we don't receive such events if a window is already disposed Disposer.register(window.getDisposable(), new Disposable() { @Override public void dispose() {