[Parameter Name Hints] toggle parameter hints moved to editor popup

This commit is contained in:
Yaroslav Lepenkin
2016-10-14 15:33:24 +03:00
parent c466ff3386
commit 80a78f71c9
2 changed files with 12 additions and 5 deletions
@@ -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) {
@@ -302,9 +302,12 @@
<group id="ParameterNameHints" popup="true">
<action id="BlacklistCurrentMethodAction" class="com.intellij.codeInsight.hints.BlacklistCurrentMethodAction"/>
<action id="ShowParameterHintsSettings" class="com.intellij.codeInsight.hints.ShowParameterHintsSettings"/>
<action id="ToggleInlineHintsAction" class="com.intellij.codeInsight.hints.ToggleInlineHintsAction"/>
</group>
<action id="ToggleInlineHintsAction" class="com.intellij.codeInsight.hints.ToggleInlineHintsAction">
<add-to-group group-id="EditorPopupMenu"/>
</action>
<!-- Analyze -->
<action id="SliceBackward" class="com.intellij.slicer.SliceBackwardAction"/>
<action id="SliceForward" class="com.intellij.slicer.SliceForwardAction"/>