ActionManager: do not report absent keymap as error for actions with "<keyboard-shortcut keymap="XXX"..." attribute (WARN instead)

This commit is contained in:
Anton Makeev
2014-12-08 14:15:27 +01:00
parent 65360b984e
commit df49eaec82
@@ -374,6 +374,14 @@ public final class ActionManagerImpl extends ActionManagerEx implements Applicat
LOG.error(new PluginException(message, null, pluginId));
}
}
private static void reportActionWarning(final PluginId pluginId, @NonNls @NotNull String message) {
if (pluginId == null) {
LOG.warn(message);
}
else {
LOG.warn(new PluginException(message, null, pluginId).getMessage());
}
}
@NonNls
private static String getPluginInfo(@Nullable PluginId id) {
@@ -919,7 +927,7 @@ public final class ActionManagerImpl extends ActionManagerEx implements Applicat
}
Keymap keymap = myKeymapManager.getKeymap(keymapName);
if (keymap == null) {
reportActionError(pluginId, "keymap \"" + keymapName + "\" not found");
reportActionWarning(pluginId, "keymap \"" + keymapName + "\" not found");
return;
}
final String removeOption = element.getAttributeValue(REMOVE_SHORTCUT_ATTR_NAME);