From 42da58a8e43f8854bfad71477e81e48249fddfa3 Mon Sep 17 00:00:00 2001 From: "Roman.Ivanov" Date: Tue, 18 Jun 2019 16:54:17 +0700 Subject: [PATCH] InlayHints: properly fill checkbox for parameter hints GitOrigin-RevId: 43e6777632ee764fd30e456156fb6a9f58dee811 --- .../hints/config/SingleLanguageInlayHintsConfigurable.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hints/config/SingleLanguageInlayHintsConfigurable.kt b/platform/lang-impl/src/com/intellij/codeInsight/hints/config/SingleLanguageInlayHintsConfigurable.kt index 38ac3bddbdb2..d832aff7378a 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hints/config/SingleLanguageInlayHintsConfigurable.kt +++ b/platform/lang-impl/src/com/intellij/codeInsight/hints/config/SingleLanguageInlayHintsConfigurable.kt @@ -2,6 +2,7 @@ package com.intellij.codeInsight.hints.config import com.intellij.codeInsight.hints.* +import com.intellij.codeInsight.hints.settings.ParameterNameHintsSettings import com.intellij.lang.Language import com.intellij.openapi.components.ServiceManager import com.intellij.openapi.options.Configurable @@ -21,7 +22,8 @@ class SingleLanguageInlayHintsConfigurable(project: Project, val language: Langu } val parameterHintsProvider = InlayParameterHintsExtension.forLanguage(language) if (parameterHintsProvider != null) { - options.add(HintProviderOption(oldParameterHintsKey, "Parameter hints", true, true)) + val enabledForLanguage = ParameterNameHintsSettings.getInstance().isEnabledForLanguage(language) + options.add(HintProviderOption(oldParameterHintsKey, "Parameter hints", true, enabledForLanguage)) } val keyToProvider = providers.associateBy { it.provider.key } val settingsWrappers = providers.map { it.toSettingsWrapper(settings, language) }