From 6453e2963ca041efabdbb3fb7cc904025e86e109 Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Thu, 7 Oct 2021 17:19:51 +0300 Subject: [PATCH] IJP-1077 Inlay hints: new settings UI do not show description/snippet for parent nodes GitOrigin-RevId: 35a1d34a50a40c534348d3056c734f5a3c836e3d --- .../codeInsight/hints/settings/InlaySettingsPanel.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hints/settings/InlaySettingsPanel.kt b/platform/lang-impl/src/com/intellij/codeInsight/hints/settings/InlaySettingsPanel.kt index 555ca4edee85..9eea2a54ea22 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hints/settings/InlaySettingsPanel.kt +++ b/platform/lang-impl/src/com/intellij/codeInsight/hints/settings/InlaySettingsPanel.kt @@ -132,10 +132,14 @@ class InlaySettingsPanel(val project: Project): JPanel(BorderLayout()) { rightPanel.removeAll() when (val item = treeNode?.userObject) { is InlayProviderSettingsModel -> { - addDescription(item.description) + if (treeNode.isLeaf) { + addDescription(item.description) + } item.component.border = JBUI.Borders.empty() rightPanel.add(item.component) - addPreview(item.getCasePreview(null) ?: item.previewText, item.language) + if (treeNode.isLeaf) { + addPreview(item.getCasePreview(null) ?: item.previewText, item.language) + } } is ImmediateConfigurable.Case -> { val parent = treeNode.parent as CheckedTreeNode