[qodana] Hide keymap warning for headless and command-line apps

(cherry picked from commit 60e044d0cf825b412d939ec288a71621e28e1b94)

IJ-CR-22959

GitOrigin-RevId: 4cdc8a272eb7585b79148f2544343f38b687f91d
This commit is contained in:
tiulpin
2022-04-06 11:10:31 +00:00
committed by intellij-monorepo-bot
parent 9d58c2ab19
commit 9ef5cc2824
@@ -352,7 +352,12 @@ public class ActionManagerImpl extends ActionManagerEx implements Disposable {
}
private static void reportKeymapNotFoundWarning(@NotNull PluginDescriptor module, @NotNull String keymapName) {
if (!DefaultKeymap.Companion.isBundledKeymapHidden(keymapName)) {
Application app = ApplicationManager.getApplication();
if (
!app.isHeadlessEnvironment() &&
!app.isCommandLine() &&
!DefaultKeymap.Companion.isBundledKeymapHidden(keymapName)
) {
LOG.warn("keymap \"" + keymapName + "\" not found" + " " + module);
}
}