From 9fba780ad3360ea51f68b341e3ca0a85f9241fe0 Mon Sep 17 00:00:00 2001 From: Yaroslav Lepenkin Date: Fri, 14 Oct 2016 15:46:49 +0300 Subject: [PATCH] [Parameter Name Hints] minor --- .../com/intellij/codeInsight/hints/PopupActions.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 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 1de7b7629666..d026f7c2ff50 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hints/PopupActions.kt +++ b/platform/lang-impl/src/com/intellij/codeInsight/hints/PopupActions.kt @@ -63,7 +63,7 @@ class BlacklistCurrentMethodAction : AnAction() { } class BlacklistCurrentMethodIntention : IntentionAction, HighPriorityAction { - override fun getText() = "Do Not Show Hints For Current Method" + override fun getText() = "Do not show hints for current method" override fun getFamilyName() = "Parameter Name Hints" override fun isAvailable(project: Project, editor: Editor, file: PsiFile): Boolean { @@ -78,12 +78,17 @@ class BlacklistCurrentMethodIntention : IntentionAction, HighPriorityAction { } class ToggleInlineHintsAction : AnAction() { - + + companion object { + private val disableText = "Disable Parameter Name Hints" + private val enableText = "Enable Parameter Name Hints" + } + override fun update(e: AnActionEvent) { 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" + e.presentation.text = if (isShow) disableText else enableText } else { e.presentation.isEnabledAndVisible = false