@codingame/monaco-vscode-keybindings-service-override 25.1.2 → 26.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardConfig.js +20 -17
- package/vscode/src/vs/workbench/contrib/commands/common/commands.contribution.js +45 -56
- package/vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js +25 -17
- package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingsEditorContribution.js +39 -36
- package/vscode/src/vs/workbench/contrib/preferences/common/smartSnippetInserter.js +37 -40
- package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +678 -724
- package/vscode/src/vs/workbench/services/commands/common/commandService.js +13 -17
- package/vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js +245 -208
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.js +64 -71
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution.js +3 -1
- package/vscode/src/vs/workbench/services/keybinding/common/keybindingIO.js +20 -25
- package/vscode/src/vs/workbench/services/keybinding/common/keymapInfo.js +21 -22
- package/vscode/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.js +185 -173
- package/vscode/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.js +49 -45
|
@@ -25,15 +25,12 @@ let CommandService = class CommandService extends Disposable {
|
|
|
25
25
|
}
|
|
26
26
|
_activateStar() {
|
|
27
27
|
if (!this._starActivation) {
|
|
28
|
-
this._starActivation = raceCancellablePromises([
|
|
29
|
-
this._extensionService.activateByEvent(`*`),
|
|
30
|
-
timeout(30000)
|
|
31
|
-
]);
|
|
28
|
+
this._starActivation = raceCancellablePromises([this._extensionService.activateByEvent(`*`), timeout(30000)]);
|
|
32
29
|
}
|
|
33
30
|
return notCancellablePromise(this._starActivation);
|
|
34
31
|
}
|
|
35
32
|
async executeCommand(id, ...args) {
|
|
36
|
-
this._logService.trace(
|
|
33
|
+
this._logService.trace("CommandService#executeCommand", id);
|
|
37
34
|
const activationEvent = `onCommand:${id}`;
|
|
38
35
|
const commandIsRegistered = !!CommandsRegistry.getCommand(id);
|
|
39
36
|
if (commandIsRegistered) {
|
|
@@ -50,9 +47,7 @@ let CommandService = class CommandService extends Disposable {
|
|
|
50
47
|
await Promise.all([
|
|
51
48
|
this._extensionService.activateByEvent(activationEvent),
|
|
52
49
|
raceCancellablePromises([
|
|
53
|
-
|
|
54
|
-
Event.toPromise(Event.filter(CommandsRegistry.onDidRegisterCommand, e => e === id))
|
|
55
|
-
]),
|
|
50
|
+
this._activateStar(), Event.toPromise(Event.filter(CommandsRegistry.onDidRegisterCommand, e => e === id))])
|
|
56
51
|
]);
|
|
57
52
|
return this._tryExecuteCommand(id, args);
|
|
58
53
|
}
|
|
@@ -62,12 +57,17 @@ let CommandService = class CommandService extends Disposable {
|
|
|
62
57
|
return Promise.reject(( new Error(`command '${id}' not found`)));
|
|
63
58
|
}
|
|
64
59
|
try {
|
|
65
|
-
this._onWillExecuteCommand.fire({
|
|
60
|
+
this._onWillExecuteCommand.fire({
|
|
61
|
+
commandId: id,
|
|
62
|
+
args
|
|
63
|
+
});
|
|
66
64
|
const result = this._instantiationService.invokeFunction(command.handler, ...args);
|
|
67
|
-
this._onDidExecuteCommand.fire({
|
|
65
|
+
this._onDidExecuteCommand.fire({
|
|
66
|
+
commandId: id,
|
|
67
|
+
args
|
|
68
|
+
});
|
|
68
69
|
return Promise.resolve(result);
|
|
69
|
-
}
|
|
70
|
-
catch (err) {
|
|
70
|
+
} catch (err) {
|
|
71
71
|
return Promise.reject(err);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -76,10 +76,6 @@ let CommandService = class CommandService extends Disposable {
|
|
|
76
76
|
this._starActivation?.cancel();
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
CommandService = ( __decorate([
|
|
80
|
-
( __param(0, IInstantiationService)),
|
|
81
|
-
( __param(1, IExtensionService)),
|
|
82
|
-
( __param(2, ILogService))
|
|
83
|
-
], CommandService));
|
|
79
|
+
CommandService = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IExtensionService)), ( __param(2, ILogService))], CommandService));
|
|
84
80
|
|
|
85
81
|
export { CommandService };
|