ui: more descriptive warning on attempt to erase shortcut of global action

This commit is contained in:
Aleksey Pivovarov
2016-03-18 17:26:59 +03:00
parent 068f7fb2e6
commit cf20da777d
@@ -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;
}