From f43e6b3ed80ebc61c4650541a95ccd8bda51f86a Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Wed, 13 Apr 2016 07:20:29 +0300 Subject: [PATCH] inspection tool window: tree exclusion action - do not need update text if disabled --- .../intellij/ide/actions/TreeNodeExclusionAction.java | 11 ++++++----- platform/platform-resources/src/idea/LangActions.xml | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/platform/platform-api/src/com/intellij/ide/actions/TreeNodeExclusionAction.java b/platform/platform-api/src/com/intellij/ide/actions/TreeNodeExclusionAction.java index 80f4de7fe1b8..91480b084920 100644 --- a/platform/platform-api/src/com/intellij/ide/actions/TreeNodeExclusionAction.java +++ b/platform/platform-api/src/com/intellij/ide/actions/TreeNodeExclusionAction.java @@ -61,7 +61,6 @@ public class TreeNodeExclusionAction extends AnAction private TreeNodeExclusionAction(boolean isExclude) { myIsExclude = isExclude; getTemplatePresentation().setText(getActionText()); - copyShortcutFrom(ActionManager.getInstance().getAction(myIsExclude ? "$Delete" : "EditorToggleInsertState")); } @Override @@ -93,11 +92,13 @@ public class TreeNodeExclusionAction extends AnAction } } presentation.setEnabledAndVisible(isEnabled); - String text = getActionText(); - if (selection.length > 1) { - text += " All"; + if (isEnabled) { + String text = getActionText(); + if (selection.length > 1) { + text += " All"; + } + presentation.setText(text); } - presentation.setText(text); } @Override diff --git a/platform/platform-resources/src/idea/LangActions.xml b/platform/platform-resources/src/idea/LangActions.xml index 48961974ba6b..22172ed32733 100644 --- a/platform/platform-resources/src/idea/LangActions.xml +++ b/platform/platform-resources/src/idea/LangActions.xml @@ -991,7 +991,7 @@ - + >