From cf20da777d1df3090acdf511027c2c2aaf240468 Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Fri, 18 Mar 2016 17:20:17 +0300 Subject: [PATCH] ui: more descriptive warning on attempt to erase shortcut of global action --- .../src/com/intellij/openapi/actionSystem/AnAction.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java b/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java index da4cb7daee7d..c681f6cbbbea 100644 --- a/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java +++ b/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java @@ -278,7 +278,9 @@ public abstract class AnAction implements PossiblyDumbAware { protected void setShortcutSet(ShortcutSet shortcutSet) { if (myIsGlobal && myShortcutSet != shortcutSet) { - LOG.warn("Shortcuts of global AnActions should not be changed outside of KeymapManager", new Throwable()); + LOG.warn("ShortcutSet of global AnActions should not be changed outside of KeymapManager.\n" + + "This is likely not what you wanted to do. Consider setting shortcut in keymap defaults, inheriting from other action " + + "using `use-shortcut-of` or wrapping with EmptyAction.wrap().", new Throwable()); } myShortcutSet = shortcutSet; }