init execution registry for keymap tests, they'd like to know about run<smth>... actions

GitOrigin-RevId: f54e4a87cf20194b6aaafd2f6ba054ee5d7539b7
This commit is contained in:
Sergey Ignatov
2019-07-24 04:32:35 +03:00
committed by intellij-monorepo-bot
parent 351994570e
commit 400edee56a
2 changed files with 9 additions and 5 deletions
@@ -15,6 +15,7 @@
*/
package com.intellij.keymap;
import com.intellij.execution.ExecutorRegistry;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.keymap.Keymap;
import com.intellij.openapi.keymap.KeymapManager;
@@ -238,6 +239,12 @@ public abstract class KeymapsTestCaseBase extends LightPlatformTestCase {
}
}
@Override
protected void setUp() throws Exception {
super.setUp();
ExecutorRegistry.getInstance();
}
@NotNull
private Map<String, Map<Shortcut, List<String>>> collectExpectedDuplicatedShortcuts() {
Map<String, Map<String, List<String>>> knownDuplicates = getKnownDuplicates();
@@ -441,11 +448,8 @@ public abstract class KeymapsTestCaseBase extends LightPlatformTestCase {
for (String actionId : keymapImpl.getActionIds()) {
if (knownBoundActions.contains(actionId)) continue;
Shortcut[] ownShortcuts = keymapImpl.getOwnShortcuts(actionId);
boolean isBound = keymapImpl.isActionBound(actionId);
if (isBound && ownShortcuts != null) {
if (isBound) {
unboundActionsWithShortcut.add(actionId);
}
}
@@ -296,7 +296,7 @@ public abstract class LightPlatformTestCase extends UsefulTestCase implements Da
@NotNull
public static Pair.NonNull<Project, Module> doSetup(@NotNull LightProjectDescriptor descriptor,
@NotNull LocalInspectionTool[] localInspectionTools,
@NotNull Disposable parentDisposable) throws Exception {
@NotNull Disposable parentDisposable) {
assertNull("Previous test " + ourTestCase + " hasn't called tearDown(). Probably overridden without super call.", ourTestCase);
IdeaLogger.ourErrorsOccurred = null;
ApplicationManager.getApplication().assertIsDispatchThread();