From 80a78f71c9b17e1f7a799c14fd24167b6076f75c Mon Sep 17 00:00:00 2001 From: Yaroslav Lepenkin Date: Fri, 14 Oct 2016 12:51:04 +0300 Subject: [PATCH] [Parameter Name Hints] toggle parameter hints moved to editor popup --- .../com/intellij/codeInsight/hints/PopupActions.kt | 12 ++++++++---- platform/platform-resources/src/idea/LangActions.xml | 5 ++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hints/PopupActions.kt b/platform/lang-impl/src/com/intellij/codeInsight/hints/PopupActions.kt index 3cf00c35b7d6..e8da4e201546 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hints/PopupActions.kt +++ b/platform/lang-impl/src/com/intellij/codeInsight/hints/PopupActions.kt @@ -73,10 +73,14 @@ class BlacklistCurrentMethodAction : AnAction() { class ToggleInlineHintsAction : AnAction() { override fun update(e: AnActionEvent) { - e.presentation.isEnabled = true - - val isShow = EditorSettingsExternalizable.getInstance().isShowParameterNameHints - e.presentation.text = if (isShow) "Disable Parameter Name Hints" else "Enable Parameter Name Hints" + if (InlayParameterHintsExtension.hasAnyExtensions()) { + e.presentation.isEnabledAndVisible = true + val isShow = EditorSettingsExternalizable.getInstance().isShowParameterNameHints + e.presentation.text = if (isShow) "Disable Parameter Name Hints" else "Enable Parameter Name Hints" + } + else { + e.presentation.isEnabledAndVisible = false + } } override fun actionPerformed(e: AnActionEvent) { diff --git a/platform/platform-resources/src/idea/LangActions.xml b/platform/platform-resources/src/idea/LangActions.xml index c5b673ed09a8..f32e0526ba96 100644 --- a/platform/platform-resources/src/idea/LangActions.xml +++ b/platform/platform-resources/src/idea/LangActions.xml @@ -302,9 +302,12 @@ - + + + +