@codingame/monaco-vscode-api 1.69.5 → 1.69.8
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/dist/api.js +8 -7
- package/dist/configuration.js +384 -73
- package/dist/contextkey.js +140 -1
- package/dist/dialogs.js +13 -12
- package/dist/extHost.js +2063 -1396
- package/dist/files.js +100 -105
- package/dist/keybindings.js +358 -307
- package/dist/languageConfiguration.js +5 -4
- package/dist/languageService.js +3 -3
- package/dist/languages.js +4 -3
- package/dist/layout.js +294 -311
- package/dist/messages.js +2 -0
- package/dist/missing-services.js +5227 -5877
- package/dist/modelEditor.js +69 -68
- package/dist/monaco.js +14 -13
- package/dist/notifications.js +268 -337
- package/dist/polyfill.js +5348 -0
- package/dist/services.js +2 -2
- package/dist/services2.js +646 -140
- package/dist/snippets.js +102 -109
- package/dist/textmate.js +82 -89
- package/dist/theme.js +396 -407
- package/dist/tokenClassification.js +4 -3
- package/dist/tokenClassificationRegistry.js +78 -84
- package/dist/tools.js +2 -1
- package/dist/workbenchThemeService.js +1 -1
- package/dist/workspaceContext.js +2 -1
- package/package.json +7 -1
package/dist/keybindings.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { j as index, g as flatten, b as __decorate, d as __param } from './contextkey.js';
|
|
2
|
+
import { E as Emitter, p as parse } from './polyfill.js';
|
|
3
|
+
import { E as ExtensionsRegistry, i as isProposedApiEnabled, j as IUserDataProfileService, I as IExtensionService, k as IKeyboardLayoutService, l as IPreferencesService, m as ExtensionMessageCollector, f as IUserDataProfilesService } from './missing-services.js';
|
|
3
4
|
import { KeyCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE } from 'monaco-editor/esm/vs/base/common/keyCodes.js';
|
|
4
|
-
import { SimpleKeybinding,
|
|
5
|
+
import { SimpleKeybinding, ChordKeybinding, ScanCodeBinding } from 'monaco-editor/esm/vs/base/common/keybindings.js';
|
|
5
6
|
import { ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
6
|
-
import {
|
|
7
|
-
import { MenuRegistry, MenuId, MenuItemAction, IMenuService
|
|
7
|
+
import { o as IHostService, d as IFileService, i as IEditorService, j as IEditorGroupsService, S as Services } from './services2.js';
|
|
8
|
+
import { MenuRegistry, MenuId, isIMenuItem, MenuItemAction, IMenuService } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
8
9
|
import { getConfiguredDefaultLocale, localize } from 'monaco-editor/esm/vs/nls.js';
|
|
9
10
|
import { ThemeIcon } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
10
11
|
import { joinPath, dirname } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
11
12
|
import { Iterable } from 'monaco-editor/esm/vs/base/common/iterator.js';
|
|
12
|
-
import { DisposableStore, toDisposable, dispose
|
|
13
|
+
import { DisposableStore, Disposable, toDisposable, dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
13
14
|
import { isFalsyOrWhitespace } from 'monaco-editor/esm/vs/base/common/strings.js';
|
|
14
15
|
import { EditorExtensionsRegistry } from 'monaco-editor/esm/vs/editor/browser/editorExtensions.js';
|
|
15
|
-
import {
|
|
16
|
+
import { CommandsRegistry, ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
16
17
|
import { isNonEmptyArray } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
17
18
|
import { AbstractKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/abstractKeybindingService.js';
|
|
18
19
|
import { KeybindingsRegistry } from 'monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js';
|
|
@@ -26,7 +27,7 @@ import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/commo
|
|
|
26
27
|
import { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
27
28
|
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
28
29
|
import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
29
|
-
import {
|
|
30
|
+
import { RunOnceScheduler, timeout } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
30
31
|
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
31
32
|
import { isArray } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
32
33
|
import { equals } from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
@@ -42,9 +43,13 @@ import { stripIcons } from 'monaco-editor/esm/vs/base/common/iconLabels.js';
|
|
|
42
43
|
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
43
44
|
import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/keybinding.js';
|
|
44
45
|
import { IDialogService } from 'monaco-editor/esm/vs/platform/dialogs/common/dialogs.js';
|
|
46
|
+
import { isFirefox } from 'monaco-editor/esm/vs/base/browser/browser.js';
|
|
47
|
+
import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
|
|
48
|
+
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
49
|
+
import { CommandsHistory } from 'monaco-editor/esm/vs/platform/quickinput/browser/commandsQuickAccess.js';
|
|
45
50
|
import { g as getServiceOverride$1 } from './files.js';
|
|
46
51
|
import { g as getExtensionPoint, c as consoleExtensionMessageHandler } from './tools.js';
|
|
47
|
-
import {
|
|
52
|
+
import { D as DEFAULT_EXTENSION } from './extHost.js';
|
|
48
53
|
import { c as createInjectedClass } from './injection.js';
|
|
49
54
|
import { StandaloneCommandsQuickAccessProvider } from 'monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js';
|
|
50
55
|
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
@@ -55,7 +60,7 @@ class WindowManager {
|
|
|
55
60
|
this._zoomLevel = 0;
|
|
56
61
|
this._zoomFactor = 1;
|
|
57
62
|
this._fullscreen = false;
|
|
58
|
-
this._onDidChangeFullscreen = (
|
|
63
|
+
this._onDidChangeFullscreen = ( new Emitter());
|
|
59
64
|
this.onDidChangeFullscreen = this._onDidChangeFullscreen.event;
|
|
60
65
|
}
|
|
61
66
|
getZoomLevel() {
|
|
@@ -84,7 +89,7 @@ class WindowManager {
|
|
|
84
89
|
return this._fullscreen;
|
|
85
90
|
}
|
|
86
91
|
}
|
|
87
|
-
WindowManager.INSTANCE = (
|
|
92
|
+
WindowManager.INSTANCE = ( new WindowManager());
|
|
88
93
|
function addMatchMediaChangeListener(query, callback) {
|
|
89
94
|
if (typeof query === 'string') {
|
|
90
95
|
query = window.matchMedia(query);
|
|
@@ -128,7 +133,7 @@ if (typeof navigator === 'object' && !isElectronRenderer) {
|
|
|
128
133
|
(_userAgent.indexOf('Macintosh') >= 0 || _userAgent.indexOf('iPad') >= 0 || _userAgent.indexOf('iPhone') >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0;
|
|
129
134
|
_userAgent.indexOf('Linux') >= 0;
|
|
130
135
|
const configuredLocale = getConfiguredDefaultLocale(
|
|
131
|
-
(
|
|
136
|
+
( localize({ key: 'ensureLoaderPluginIsLoaded', comment: ['{Locked}'] }, '_')));
|
|
132
137
|
_locale = configuredLocale || LANGUAGE_DEFAULT;
|
|
133
138
|
_language = _locale;
|
|
134
139
|
}
|
|
@@ -153,7 +158,7 @@ else {
|
|
|
153
158
|
const userAgent = _userAgent;
|
|
154
159
|
const language = _language;
|
|
155
160
|
var Language;
|
|
156
|
-
( (
|
|
161
|
+
( (function(Language) {
|
|
157
162
|
function value() {
|
|
158
163
|
return language;
|
|
159
164
|
}
|
|
@@ -174,7 +179,7 @@ var Language;
|
|
|
174
179
|
return language === 'en';
|
|
175
180
|
}
|
|
176
181
|
Language.isDefault = isDefault;
|
|
177
|
-
})(Language || (Language = {})))
|
|
182
|
+
})(Language || (Language = {})));
|
|
178
183
|
const setTimeout0IsFaster = (typeof globals.postMessage === 'function' && !globals.importScripts);
|
|
179
184
|
(() => {
|
|
180
185
|
if (setTimeout0IsFaster) {
|
|
@@ -246,331 +251,336 @@ function printStandardKeyboardEvent(e) {
|
|
|
246
251
|
if (e.metaKey) {
|
|
247
252
|
modifiers.push(`meta`);
|
|
248
253
|
}
|
|
249
|
-
return `modifiers: [${modifiers.join(',')}], code: ${e.code}, keyCode: ${e.keyCode} ('${(
|
|
254
|
+
return `modifiers: [${modifiers.join(',')}], code: ${e.code}, keyCode: ${e.keyCode} ('${( KeyCodeUtils.toString(e.keyCode))}')`;
|
|
255
|
+
}
|
|
256
|
+
class Action2 {
|
|
257
|
+
constructor(desc) {
|
|
258
|
+
this.desc = desc;
|
|
259
|
+
}
|
|
250
260
|
}
|
|
251
261
|
const apiMenus = [
|
|
252
262
|
{
|
|
253
263
|
key: 'commandPalette',
|
|
254
264
|
id: MenuId.CommandPalette,
|
|
255
|
-
description: (
|
|
265
|
+
description: ( localize('menus.commandPalette', "The Command Palette")),
|
|
256
266
|
supportsSubmenus: false
|
|
257
267
|
},
|
|
258
268
|
{
|
|
259
269
|
key: 'touchBar',
|
|
260
270
|
id: MenuId.TouchBarContext,
|
|
261
|
-
description: (
|
|
271
|
+
description: ( localize('menus.touchBar', "The touch bar (macOS only)")),
|
|
262
272
|
supportsSubmenus: false
|
|
263
273
|
},
|
|
264
274
|
{
|
|
265
275
|
key: 'editor/title',
|
|
266
276
|
id: MenuId.EditorTitle,
|
|
267
|
-
description: (
|
|
277
|
+
description: ( localize('menus.editorTitle', "The editor title menu"))
|
|
268
278
|
},
|
|
269
279
|
{
|
|
270
280
|
key: 'editor/title/run',
|
|
271
281
|
id: MenuId.EditorTitleRun,
|
|
272
|
-
description: (
|
|
282
|
+
description: ( localize('menus.editorTitleRun', "Run submenu inside the editor title menu"))
|
|
273
283
|
},
|
|
274
284
|
{
|
|
275
285
|
key: 'editor/context',
|
|
276
286
|
id: MenuId.EditorContext,
|
|
277
|
-
description: (
|
|
287
|
+
description: ( localize('menus.editorContext', "The editor context menu"))
|
|
278
288
|
},
|
|
279
289
|
{
|
|
280
290
|
key: 'editor/context/copy',
|
|
281
291
|
id: MenuId.EditorContextCopy,
|
|
282
|
-
description: (
|
|
292
|
+
description: ( localize(
|
|
283
293
|
'menus.editorContextCopyAs',
|
|
284
294
|
"'Copy as' submenu in the editor context menu"
|
|
285
|
-
))
|
|
295
|
+
))
|
|
286
296
|
},
|
|
287
297
|
{
|
|
288
298
|
key: 'editor/context/share',
|
|
289
299
|
id: MenuId.EditorContextShare,
|
|
290
|
-
description: (
|
|
300
|
+
description: ( localize('menus.editorContextShare', "'Share' submenu in the editor context menu")),
|
|
291
301
|
proposed: 'contribShareMenu'
|
|
292
302
|
},
|
|
293
303
|
{
|
|
294
304
|
key: 'explorer/context',
|
|
295
305
|
id: MenuId.ExplorerContext,
|
|
296
|
-
description: (
|
|
306
|
+
description: ( localize('menus.explorerContext', "The file explorer context menu"))
|
|
297
307
|
},
|
|
298
308
|
{
|
|
299
309
|
key: 'editor/title/context',
|
|
300
310
|
id: MenuId.EditorTitleContext,
|
|
301
|
-
description: (
|
|
311
|
+
description: ( localize('menus.editorTabContext', "The editor tabs context menu"))
|
|
302
312
|
},
|
|
303
313
|
{
|
|
304
314
|
key: 'debug/callstack/context',
|
|
305
315
|
id: MenuId.DebugCallStackContext,
|
|
306
|
-
description: (
|
|
316
|
+
description: ( localize('menus.debugCallstackContext', "The debug callstack view context menu"))
|
|
307
317
|
},
|
|
308
318
|
{
|
|
309
319
|
key: 'debug/variables/context',
|
|
310
320
|
id: MenuId.DebugVariablesContext,
|
|
311
|
-
description: (
|
|
321
|
+
description: ( localize('menus.debugVariablesContext', "The debug variables view context menu"))
|
|
312
322
|
},
|
|
313
323
|
{
|
|
314
324
|
key: 'debug/toolBar',
|
|
315
325
|
id: MenuId.DebugToolBar,
|
|
316
|
-
description: (
|
|
326
|
+
description: ( localize('menus.debugToolBar', "The debug toolbar menu"))
|
|
317
327
|
},
|
|
318
328
|
{
|
|
319
329
|
key: 'menuBar/home',
|
|
320
330
|
id: MenuId.MenubarHomeMenu,
|
|
321
|
-
description: (
|
|
331
|
+
description: ( localize('menus.home', "The home indicator context menu (web only)")),
|
|
322
332
|
proposed: 'contribMenuBarHome',
|
|
323
333
|
supportsSubmenus: false
|
|
324
334
|
},
|
|
325
335
|
{
|
|
326
336
|
key: 'menuBar/edit/copy',
|
|
327
337
|
id: MenuId.MenubarCopy,
|
|
328
|
-
description: (
|
|
338
|
+
description: ( localize('menus.opy', "'Copy as' submenu in the top level Edit menu"))
|
|
329
339
|
},
|
|
330
340
|
{
|
|
331
341
|
key: 'scm/title',
|
|
332
342
|
id: MenuId.SCMTitle,
|
|
333
|
-
description: (
|
|
343
|
+
description: ( localize('menus.scmTitle', "The Source Control title menu"))
|
|
334
344
|
},
|
|
335
345
|
{
|
|
336
346
|
key: 'scm/sourceControl',
|
|
337
347
|
id: MenuId.SCMSourceControl,
|
|
338
|
-
description: (
|
|
348
|
+
description: ( localize('menus.scmSourceControl', "The Source Control menu"))
|
|
339
349
|
},
|
|
340
350
|
{
|
|
341
351
|
key: 'scm/resourceState/context',
|
|
342
352
|
id: MenuId.SCMResourceContext,
|
|
343
|
-
description: (
|
|
353
|
+
description: ( localize(
|
|
344
354
|
'menus.resourceStateContext',
|
|
345
355
|
"The Source Control resource state context menu"
|
|
346
|
-
))
|
|
356
|
+
))
|
|
347
357
|
},
|
|
348
358
|
{
|
|
349
359
|
key: 'scm/resourceFolder/context',
|
|
350
360
|
id: MenuId.SCMResourceFolderContext,
|
|
351
|
-
description: (
|
|
361
|
+
description: ( localize(
|
|
352
362
|
'menus.resourceFolderContext',
|
|
353
363
|
"The Source Control resource folder context menu"
|
|
354
|
-
))
|
|
364
|
+
))
|
|
355
365
|
},
|
|
356
366
|
{
|
|
357
367
|
key: 'scm/resourceGroup/context',
|
|
358
368
|
id: MenuId.SCMResourceGroupContext,
|
|
359
|
-
description: (
|
|
369
|
+
description: ( localize(
|
|
360
370
|
'menus.resourceGroupContext',
|
|
361
371
|
"The Source Control resource group context menu"
|
|
362
|
-
))
|
|
372
|
+
))
|
|
363
373
|
},
|
|
364
374
|
{
|
|
365
375
|
key: 'scm/change/title',
|
|
366
376
|
id: MenuId.SCMChangeContext,
|
|
367
|
-
description: (
|
|
377
|
+
description: ( localize('menus.changeTitle', "The Source Control inline change menu"))
|
|
368
378
|
},
|
|
369
379
|
{
|
|
370
380
|
key: 'statusBar/remoteIndicator',
|
|
371
381
|
id: MenuId.StatusBarRemoteIndicatorMenu,
|
|
372
|
-
description: (
|
|
382
|
+
description: ( localize(
|
|
373
383
|
'menus.statusBarRemoteIndicator',
|
|
374
384
|
"The remote indicator menu in the status bar"
|
|
375
|
-
))
|
|
385
|
+
)),
|
|
376
386
|
supportsSubmenus: false
|
|
377
387
|
},
|
|
378
388
|
{
|
|
379
389
|
key: 'view/title',
|
|
380
390
|
id: MenuId.ViewTitle,
|
|
381
|
-
description: (
|
|
391
|
+
description: ( localize('view.viewTitle', "The contributed view title menu"))
|
|
382
392
|
},
|
|
383
393
|
{
|
|
384
394
|
key: 'view/item/context',
|
|
385
395
|
id: MenuId.ViewItemContext,
|
|
386
|
-
description: (
|
|
396
|
+
description: ( localize('view.itemContext', "The contributed view item context menu"))
|
|
387
397
|
},
|
|
388
398
|
{
|
|
389
399
|
key: 'comments/commentThread/title',
|
|
390
400
|
id: MenuId.CommentThreadTitle,
|
|
391
|
-
description: (
|
|
401
|
+
description: ( localize('commentThread.title', "The contributed comment thread title menu"))
|
|
392
402
|
},
|
|
393
403
|
{
|
|
394
404
|
key: 'comments/commentThread/context',
|
|
395
405
|
id: MenuId.CommentThreadActions,
|
|
396
|
-
description: (
|
|
406
|
+
description: ( localize(
|
|
397
407
|
'commentThread.actions',
|
|
398
408
|
"The contributed comment thread context menu, rendered as buttons below the comment editor"
|
|
399
|
-
))
|
|
409
|
+
)),
|
|
400
410
|
supportsSubmenus: false
|
|
401
411
|
},
|
|
402
412
|
{
|
|
403
413
|
key: 'comments/comment/title',
|
|
404
414
|
id: MenuId.CommentTitle,
|
|
405
|
-
description: (
|
|
415
|
+
description: ( localize('comment.title', "The contributed comment title menu"))
|
|
406
416
|
},
|
|
407
417
|
{
|
|
408
418
|
key: 'comments/comment/context',
|
|
409
419
|
id: MenuId.CommentActions,
|
|
410
|
-
description: (
|
|
420
|
+
description: ( localize(
|
|
411
421
|
'comment.actions',
|
|
412
422
|
"The contributed comment context menu, rendered as buttons below the comment editor"
|
|
413
|
-
))
|
|
423
|
+
)),
|
|
414
424
|
supportsSubmenus: false
|
|
415
425
|
},
|
|
416
426
|
{
|
|
417
427
|
key: 'notebook/toolbar',
|
|
418
428
|
id: MenuId.NotebookToolbar,
|
|
419
|
-
description: (
|
|
429
|
+
description: ( localize('notebook.toolbar', "The contributed notebook toolbar menu"))
|
|
420
430
|
},
|
|
421
431
|
{
|
|
422
432
|
key: 'notebook/kernelSource',
|
|
423
433
|
id: MenuId.NotebookKernelSource,
|
|
424
|
-
description: (
|
|
434
|
+
description: ( localize('notebook.kernelSource', "The contributed notebook kernel sources menu")),
|
|
425
435
|
proposed: 'notebookKernelSource'
|
|
426
436
|
},
|
|
427
437
|
{
|
|
428
438
|
key: 'notebook/cell/title',
|
|
429
439
|
id: MenuId.NotebookCellTitle,
|
|
430
|
-
description: (
|
|
440
|
+
description: ( localize('notebook.cell.title', "The contributed notebook cell title menu"))
|
|
431
441
|
},
|
|
432
442
|
{
|
|
433
443
|
key: 'notebook/cell/execute',
|
|
434
444
|
id: MenuId.NotebookCellExecute,
|
|
435
|
-
description: (
|
|
445
|
+
description: ( localize('notebook.cell.execute', "The contributed notebook cell execution menu"))
|
|
436
446
|
},
|
|
437
447
|
{
|
|
438
448
|
key: 'notebook/cell/executePrimary',
|
|
439
449
|
id: MenuId.NotebookCellExecutePrimary,
|
|
440
|
-
description: (
|
|
450
|
+
description: ( localize(
|
|
441
451
|
'notebook.cell.executePrimary',
|
|
442
452
|
"The contributed primary notebook cell execution button"
|
|
443
|
-
))
|
|
453
|
+
)),
|
|
444
454
|
proposed: 'notebookEditor'
|
|
445
455
|
},
|
|
446
456
|
{
|
|
447
457
|
key: 'interactive/toolbar',
|
|
448
458
|
id: MenuId.InteractiveToolbar,
|
|
449
|
-
description: (
|
|
459
|
+
description: ( localize('interactive.toolbar', "The contributed interactive toolbar menu")),
|
|
450
460
|
},
|
|
451
461
|
{
|
|
452
462
|
key: 'interactive/cell/title',
|
|
453
463
|
id: MenuId.InteractiveCellTitle,
|
|
454
|
-
description: (
|
|
464
|
+
description: ( localize('interactive.cell.title', "The contributed interactive cell title menu")),
|
|
455
465
|
},
|
|
456
466
|
{
|
|
457
467
|
key: 'testing/item/context',
|
|
458
468
|
id: MenuId.TestItem,
|
|
459
|
-
description: (
|
|
469
|
+
description: ( localize('testing.item.context', "The contributed test item menu")),
|
|
460
470
|
},
|
|
461
471
|
{
|
|
462
472
|
key: 'testing/item/gutter',
|
|
463
473
|
id: MenuId.TestItemGutter,
|
|
464
|
-
description: (
|
|
474
|
+
description: ( localize(
|
|
465
475
|
'testing.item.gutter.title',
|
|
466
476
|
"The menu for a gutter decoration for a test item"
|
|
467
|
-
))
|
|
477
|
+
)),
|
|
468
478
|
},
|
|
469
479
|
{
|
|
470
480
|
key: 'extension/context',
|
|
471
481
|
id: MenuId.ExtensionContext,
|
|
472
|
-
description: (
|
|
482
|
+
description: ( localize('menus.extensionContext', "The extension context menu"))
|
|
473
483
|
},
|
|
474
484
|
{
|
|
475
485
|
key: 'timeline/title',
|
|
476
486
|
id: MenuId.TimelineTitle,
|
|
477
|
-
description: (
|
|
487
|
+
description: ( localize('view.timelineTitle', "The Timeline view title menu"))
|
|
478
488
|
},
|
|
479
489
|
{
|
|
480
490
|
key: 'timeline/item/context',
|
|
481
491
|
id: MenuId.TimelineItemContext,
|
|
482
|
-
description: (
|
|
492
|
+
description: ( localize('view.timelineContext', "The Timeline view item context menu"))
|
|
483
493
|
},
|
|
484
494
|
{
|
|
485
495
|
key: 'ports/item/context',
|
|
486
496
|
id: MenuId.TunnelContext,
|
|
487
|
-
description: (
|
|
497
|
+
description: ( localize('view.tunnelContext', "The Ports view item context menu"))
|
|
488
498
|
},
|
|
489
499
|
{
|
|
490
500
|
key: 'ports/item/origin/inline',
|
|
491
501
|
id: MenuId.TunnelOriginInline,
|
|
492
|
-
description: (
|
|
502
|
+
description: ( localize('view.tunnelOriginInline', "The Ports view item origin inline menu"))
|
|
493
503
|
},
|
|
494
504
|
{
|
|
495
505
|
key: 'ports/item/port/inline',
|
|
496
506
|
id: MenuId.TunnelPortInline,
|
|
497
|
-
description: (
|
|
507
|
+
description: ( localize('view.tunnelPortInline', "The Ports view item port inline menu"))
|
|
498
508
|
},
|
|
499
509
|
{
|
|
500
510
|
key: 'file/newFile',
|
|
501
511
|
id: MenuId.NewFile,
|
|
502
|
-
description: (
|
|
512
|
+
description: ( localize(
|
|
503
513
|
'file.newFile',
|
|
504
514
|
"The 'New File...' quick pick, shown on welcome page and File menu."
|
|
505
|
-
))
|
|
515
|
+
)),
|
|
506
516
|
supportsSubmenus: false,
|
|
507
517
|
},
|
|
508
518
|
{
|
|
509
519
|
key: 'file/share',
|
|
510
520
|
id: MenuId.MenubarShare,
|
|
511
|
-
description: (
|
|
521
|
+
description: ( localize('menus.share', "Share submenu shown in the top level File menu.")),
|
|
512
522
|
proposed: 'contribShareMenu'
|
|
513
523
|
},
|
|
514
524
|
{
|
|
515
525
|
key: 'editor/inlineCompletions/actions',
|
|
516
526
|
id: MenuId.InlineCompletionsActions,
|
|
517
|
-
description: (
|
|
527
|
+
description: ( localize(
|
|
518
528
|
'inlineCompletions.actions',
|
|
519
529
|
"The actions shown when hovering on an inline completion"
|
|
520
|
-
))
|
|
530
|
+
)),
|
|
521
531
|
supportsSubmenus: false,
|
|
522
532
|
proposed: 'inlineCompletionsAdditions'
|
|
523
533
|
},
|
|
524
534
|
{
|
|
525
535
|
key: 'merge/toolbar',
|
|
526
536
|
id: MenuId.MergeToolbar,
|
|
527
|
-
description: (
|
|
537
|
+
description: ( localize('merge.toolbar', "The prominent botton in the merge editor")),
|
|
528
538
|
proposed: 'contribMergeEditorToolbar'
|
|
529
539
|
},
|
|
530
540
|
{
|
|
531
541
|
key: 'webview/context',
|
|
532
542
|
id: MenuId.WebviewContext,
|
|
533
|
-
description: (
|
|
543
|
+
description: ( localize('webview.context', "The webview context menu")),
|
|
534
544
|
proposed: 'contribWebviewContext'
|
|
535
545
|
},
|
|
536
546
|
];
|
|
537
547
|
var schema$1;
|
|
538
|
-
( (
|
|
548
|
+
( (function(schema) {
|
|
539
549
|
function isMenuItem(item) {
|
|
540
550
|
return typeof item.command === 'string';
|
|
541
551
|
}
|
|
542
552
|
schema.isMenuItem = isMenuItem;
|
|
543
553
|
function isValidMenuItem(item, collector) {
|
|
544
554
|
if (typeof item.command !== 'string') {
|
|
545
|
-
collector.error((
|
|
555
|
+
collector.error(( localize(
|
|
546
556
|
'requirestring',
|
|
547
557
|
"property `{0}` is mandatory and must be of type `string`",
|
|
548
558
|
'command'
|
|
549
|
-
)))
|
|
559
|
+
)));
|
|
550
560
|
return false;
|
|
551
561
|
}
|
|
552
562
|
if (item.alt && typeof item.alt !== 'string') {
|
|
553
|
-
collector.error((
|
|
563
|
+
collector.error(( localize(
|
|
554
564
|
'optstring',
|
|
555
565
|
"property `{0}` can be omitted or must be of type `string`",
|
|
556
566
|
'alt'
|
|
557
|
-
)))
|
|
567
|
+
)));
|
|
558
568
|
return false;
|
|
559
569
|
}
|
|
560
570
|
if (item.when && typeof item.when !== 'string') {
|
|
561
|
-
collector.error((
|
|
571
|
+
collector.error(( localize(
|
|
562
572
|
'optstring',
|
|
563
573
|
"property `{0}` can be omitted or must be of type `string`",
|
|
564
574
|
'when'
|
|
565
|
-
)))
|
|
575
|
+
)));
|
|
566
576
|
return false;
|
|
567
577
|
}
|
|
568
578
|
if (item.group && typeof item.group !== 'string') {
|
|
569
|
-
collector.error((
|
|
579
|
+
collector.error(( localize(
|
|
570
580
|
'optstring',
|
|
571
581
|
"property `{0}` can be omitted or must be of type `string`",
|
|
572
582
|
'group'
|
|
573
|
-
)))
|
|
583
|
+
)));
|
|
574
584
|
return false;
|
|
575
585
|
}
|
|
576
586
|
return true;
|
|
@@ -578,27 +588,27 @@ var schema$1;
|
|
|
578
588
|
schema.isValidMenuItem = isValidMenuItem;
|
|
579
589
|
function isValidSubmenuItem(item, collector) {
|
|
580
590
|
if (typeof item.submenu !== 'string') {
|
|
581
|
-
collector.error((
|
|
591
|
+
collector.error(( localize(
|
|
582
592
|
'requirestring',
|
|
583
593
|
"property `{0}` is mandatory and must be of type `string`",
|
|
584
594
|
'submenu'
|
|
585
|
-
)))
|
|
595
|
+
)));
|
|
586
596
|
return false;
|
|
587
597
|
}
|
|
588
598
|
if (item.when && typeof item.when !== 'string') {
|
|
589
|
-
collector.error((
|
|
599
|
+
collector.error(( localize(
|
|
590
600
|
'optstring',
|
|
591
601
|
"property `{0}` can be omitted or must be of type `string`",
|
|
592
602
|
'when'
|
|
593
|
-
)))
|
|
603
|
+
)));
|
|
594
604
|
return false;
|
|
595
605
|
}
|
|
596
606
|
if (item.group && typeof item.group !== 'string') {
|
|
597
|
-
collector.error((
|
|
607
|
+
collector.error(( localize(
|
|
598
608
|
'optstring',
|
|
599
609
|
"property `{0}` can be omitted or must be of type `string`",
|
|
600
610
|
'group'
|
|
601
|
-
)))
|
|
611
|
+
)));
|
|
602
612
|
return false;
|
|
603
613
|
}
|
|
604
614
|
return true;
|
|
@@ -606,7 +616,7 @@ var schema$1;
|
|
|
606
616
|
schema.isValidSubmenuItem = isValidSubmenuItem;
|
|
607
617
|
function isValidItems(items, collector) {
|
|
608
618
|
if (!Array.isArray(items)) {
|
|
609
|
-
collector.error((
|
|
619
|
+
collector.error(( localize('requirearray', "submenu items must be an array")));
|
|
610
620
|
return false;
|
|
611
621
|
}
|
|
612
622
|
for (const item of items) {
|
|
@@ -626,23 +636,23 @@ var schema$1;
|
|
|
626
636
|
schema.isValidItems = isValidItems;
|
|
627
637
|
function isValidSubmenu(submenu, collector) {
|
|
628
638
|
if (typeof submenu !== 'object') {
|
|
629
|
-
collector.error((
|
|
639
|
+
collector.error(( localize('require', "submenu items must be an object")));
|
|
630
640
|
return false;
|
|
631
641
|
}
|
|
632
642
|
if (typeof submenu.id !== 'string') {
|
|
633
|
-
collector.error((
|
|
643
|
+
collector.error(( localize(
|
|
634
644
|
'requirestring',
|
|
635
645
|
"property `{0}` is mandatory and must be of type `string`",
|
|
636
646
|
'id'
|
|
637
|
-
)))
|
|
647
|
+
)));
|
|
638
648
|
return false;
|
|
639
649
|
}
|
|
640
650
|
if (typeof submenu.label !== 'string') {
|
|
641
|
-
collector.error((
|
|
651
|
+
collector.error(( localize(
|
|
642
652
|
'requirestring',
|
|
643
653
|
"property `{0}` is mandatory and must be of type `string`",
|
|
644
654
|
'label'
|
|
645
|
-
)))
|
|
655
|
+
)));
|
|
646
656
|
return false;
|
|
647
657
|
}
|
|
648
658
|
return true;
|
|
@@ -653,31 +663,31 @@ var schema$1;
|
|
|
653
663
|
required: ['command'],
|
|
654
664
|
properties: {
|
|
655
665
|
command: {
|
|
656
|
-
description: (
|
|
666
|
+
description: ( localize(
|
|
657
667
|
'vscode.extension.contributes.menuItem.command',
|
|
658
668
|
'Identifier of the command to execute. The command must be declared in the \'commands\'-section'
|
|
659
|
-
))
|
|
669
|
+
)),
|
|
660
670
|
type: 'string'
|
|
661
671
|
},
|
|
662
672
|
alt: {
|
|
663
|
-
description: (
|
|
673
|
+
description: ( localize(
|
|
664
674
|
'vscode.extension.contributes.menuItem.alt',
|
|
665
675
|
'Identifier of an alternative command to execute. The command must be declared in the \'commands\'-section'
|
|
666
|
-
))
|
|
676
|
+
)),
|
|
667
677
|
type: 'string'
|
|
668
678
|
},
|
|
669
679
|
when: {
|
|
670
|
-
description: (
|
|
680
|
+
description: ( localize(
|
|
671
681
|
'vscode.extension.contributes.menuItem.when',
|
|
672
682
|
'Condition which must be true to show this item'
|
|
673
|
-
))
|
|
683
|
+
)),
|
|
674
684
|
type: 'string'
|
|
675
685
|
},
|
|
676
686
|
group: {
|
|
677
|
-
description: (
|
|
687
|
+
description: ( localize(
|
|
678
688
|
'vscode.extension.contributes.menuItem.group',
|
|
679
689
|
'Group into which this item belongs'
|
|
680
|
-
))
|
|
690
|
+
)),
|
|
681
691
|
type: 'string'
|
|
682
692
|
}
|
|
683
693
|
}
|
|
@@ -687,24 +697,24 @@ var schema$1;
|
|
|
687
697
|
required: ['submenu'],
|
|
688
698
|
properties: {
|
|
689
699
|
submenu: {
|
|
690
|
-
description: (
|
|
700
|
+
description: ( localize(
|
|
691
701
|
'vscode.extension.contributes.menuItem.submenu',
|
|
692
702
|
'Identifier of the submenu to display in this item.'
|
|
693
|
-
))
|
|
703
|
+
)),
|
|
694
704
|
type: 'string'
|
|
695
705
|
},
|
|
696
706
|
when: {
|
|
697
|
-
description: (
|
|
707
|
+
description: ( localize(
|
|
698
708
|
'vscode.extension.contributes.menuItem.when',
|
|
699
709
|
'Condition which must be true to show this item'
|
|
700
|
-
))
|
|
710
|
+
)),
|
|
701
711
|
type: 'string'
|
|
702
712
|
},
|
|
703
713
|
group: {
|
|
704
|
-
description: (
|
|
714
|
+
description: ( localize(
|
|
705
715
|
'vscode.extension.contributes.menuItem.group',
|
|
706
716
|
'Group into which this item belongs'
|
|
707
|
-
))
|
|
717
|
+
)),
|
|
708
718
|
type: 'string'
|
|
709
719
|
}
|
|
710
720
|
}
|
|
@@ -714,24 +724,24 @@ var schema$1;
|
|
|
714
724
|
required: ['id', 'label'],
|
|
715
725
|
properties: {
|
|
716
726
|
id: {
|
|
717
|
-
description: (
|
|
727
|
+
description: ( localize(
|
|
718
728
|
'vscode.extension.contributes.submenu.id',
|
|
719
729
|
'Identifier of the menu to display as a submenu.'
|
|
720
|
-
))
|
|
730
|
+
)),
|
|
721
731
|
type: 'string'
|
|
722
732
|
},
|
|
723
733
|
label: {
|
|
724
|
-
description: (
|
|
734
|
+
description: ( localize(
|
|
725
735
|
'vscode.extension.contributes.submenu.label',
|
|
726
736
|
'The label of the menu item which leads to this submenu.'
|
|
727
|
-
))
|
|
737
|
+
)),
|
|
728
738
|
type: 'string'
|
|
729
739
|
},
|
|
730
740
|
icon: {
|
|
731
|
-
description: (
|
|
741
|
+
description: ( localize(
|
|
732
742
|
{ key: 'vscode.extension.contributes.submenu.icon', comment: ['do not translate or change `\\$(zap)`, \\ in front of $ is important.'] },
|
|
733
743
|
'(Optional) Icon which is used to represent the submenu in the UI. Either a file path, an object with file paths for dark and light themes, or a theme icon references, like `\\$(zap)`'
|
|
734
|
-
))
|
|
744
|
+
)),
|
|
735
745
|
anyOf: [{
|
|
736
746
|
type: 'string'
|
|
737
747
|
},
|
|
@@ -739,17 +749,17 @@ var schema$1;
|
|
|
739
749
|
type: 'object',
|
|
740
750
|
properties: {
|
|
741
751
|
light: {
|
|
742
|
-
description: (
|
|
752
|
+
description: ( localize(
|
|
743
753
|
'vscode.extension.contributes.submenu.icon.light',
|
|
744
754
|
'Icon path when a light theme is used'
|
|
745
|
-
))
|
|
755
|
+
)),
|
|
746
756
|
type: 'string'
|
|
747
757
|
},
|
|
748
758
|
dark: {
|
|
749
|
-
description: (
|
|
759
|
+
description: ( localize(
|
|
750
760
|
'vscode.extension.contributes.submenu.icon.dark',
|
|
751
761
|
'Icon path when a dark theme is used'
|
|
752
|
-
))
|
|
762
|
+
)),
|
|
753
763
|
type: 'string'
|
|
754
764
|
}
|
|
755
765
|
}
|
|
@@ -758,18 +768,18 @@ var schema$1;
|
|
|
758
768
|
}
|
|
759
769
|
};
|
|
760
770
|
schema.menusContribution = {
|
|
761
|
-
description: (
|
|
771
|
+
description: ( localize(
|
|
762
772
|
'vscode.extension.contributes.menus',
|
|
763
773
|
"Contributes menu items to the editor"
|
|
764
|
-
))
|
|
774
|
+
)),
|
|
765
775
|
type: 'object',
|
|
766
776
|
properties: index(apiMenus, menu => menu.key, menu => ({
|
|
767
|
-
markdownDescription: menu.proposed ? (
|
|
777
|
+
markdownDescription: menu.proposed ? ( localize(
|
|
768
778
|
'proposed',
|
|
769
779
|
"Proposed API, requires `enabledApiProposal: [\"{0}\"]` - {1}",
|
|
770
780
|
menu.proposed,
|
|
771
781
|
menu.description
|
|
772
|
-
))
|
|
782
|
+
)) : menu.description,
|
|
773
783
|
type: 'array',
|
|
774
784
|
items: menu.supportsSubmenus === false ? menuItem : { oneOf: [menuItem, submenuItem] }
|
|
775
785
|
})),
|
|
@@ -780,24 +790,24 @@ var schema$1;
|
|
|
780
790
|
}
|
|
781
791
|
};
|
|
782
792
|
schema.submenusContribution = {
|
|
783
|
-
description: (
|
|
793
|
+
description: ( localize(
|
|
784
794
|
'vscode.extension.contributes.submenus',
|
|
785
795
|
"Contributes submenu items to the editor"
|
|
786
|
-
))
|
|
796
|
+
)),
|
|
787
797
|
type: 'array',
|
|
788
798
|
items: submenu
|
|
789
799
|
};
|
|
790
800
|
function isValidCommand(command, collector) {
|
|
791
801
|
if (!command) {
|
|
792
|
-
collector.error((
|
|
802
|
+
collector.error(( localize('nonempty', "expected non-empty value.")));
|
|
793
803
|
return false;
|
|
794
804
|
}
|
|
795
805
|
if (isFalsyOrWhitespace(command.command)) {
|
|
796
|
-
collector.error((
|
|
806
|
+
collector.error(( localize(
|
|
797
807
|
'requirestring',
|
|
798
808
|
"property `{0}` is mandatory and must be of type `string`",
|
|
799
809
|
'command'
|
|
800
|
-
)))
|
|
810
|
+
)));
|
|
801
811
|
return false;
|
|
802
812
|
}
|
|
803
813
|
if (!isValidLocalizedString(command.title, collector, 'title')) {
|
|
@@ -807,11 +817,11 @@ var schema$1;
|
|
|
807
817
|
return false;
|
|
808
818
|
}
|
|
809
819
|
if (command.enablement && typeof command.enablement !== 'string') {
|
|
810
|
-
collector.error((
|
|
820
|
+
collector.error(( localize(
|
|
811
821
|
'optstring',
|
|
812
822
|
"property `{0}` can be omitted or must be of type `string`",
|
|
813
823
|
'precondition'
|
|
814
|
-
)))
|
|
824
|
+
)));
|
|
815
825
|
return false;
|
|
816
826
|
}
|
|
817
827
|
if (command.category && !isValidLocalizedString(command.category, collector, 'category')) {
|
|
@@ -833,36 +843,36 @@ var schema$1;
|
|
|
833
843
|
else if (typeof icon.dark === 'string' && typeof icon.light === 'string') {
|
|
834
844
|
return true;
|
|
835
845
|
}
|
|
836
|
-
collector.error((
|
|
846
|
+
collector.error(( localize(
|
|
837
847
|
'opticon',
|
|
838
848
|
"property `icon` can be omitted or must be either a string or a literal like `{dark, light}`"
|
|
839
|
-
)))
|
|
849
|
+
)));
|
|
840
850
|
return false;
|
|
841
851
|
}
|
|
842
852
|
function isValidLocalizedString(localized, collector, propertyName) {
|
|
843
853
|
if (typeof localized === 'undefined') {
|
|
844
|
-
collector.error((
|
|
854
|
+
collector.error(( localize(
|
|
845
855
|
'requireStringOrObject',
|
|
846
856
|
"property `{0}` is mandatory and must be of type `string` or `object`",
|
|
847
857
|
propertyName
|
|
848
|
-
)))
|
|
858
|
+
)));
|
|
849
859
|
return false;
|
|
850
860
|
}
|
|
851
861
|
else if (typeof localized === 'string' && isFalsyOrWhitespace(localized)) {
|
|
852
|
-
collector.error((
|
|
862
|
+
collector.error(( localize(
|
|
853
863
|
'requirestring',
|
|
854
864
|
"property `{0}` is mandatory and must be of type `string`",
|
|
855
865
|
propertyName
|
|
856
|
-
)))
|
|
866
|
+
)));
|
|
857
867
|
return false;
|
|
858
868
|
}
|
|
859
869
|
else if (typeof localized !== 'string' && (isFalsyOrWhitespace(localized.original) || isFalsyOrWhitespace(localized.value))) {
|
|
860
|
-
collector.error((
|
|
870
|
+
collector.error(( localize(
|
|
861
871
|
'requirestrings',
|
|
862
872
|
"properties `{0}` and `{1}` are mandatory and must be of type `string`",
|
|
863
873
|
`${propertyName}.value`,
|
|
864
874
|
`${propertyName}.original`
|
|
865
|
-
)))
|
|
875
|
+
)));
|
|
866
876
|
return false;
|
|
867
877
|
}
|
|
868
878
|
return true;
|
|
@@ -872,45 +882,45 @@ var schema$1;
|
|
|
872
882
|
required: ['command', 'title'],
|
|
873
883
|
properties: {
|
|
874
884
|
command: {
|
|
875
|
-
description: (
|
|
885
|
+
description: ( localize(
|
|
876
886
|
'vscode.extension.contributes.commandType.command',
|
|
877
887
|
'Identifier of the command to execute'
|
|
878
|
-
))
|
|
888
|
+
)),
|
|
879
889
|
type: 'string'
|
|
880
890
|
},
|
|
881
891
|
title: {
|
|
882
|
-
description: (
|
|
892
|
+
description: ( localize(
|
|
883
893
|
'vscode.extension.contributes.commandType.title',
|
|
884
894
|
'Title by which the command is represented in the UI'
|
|
885
|
-
))
|
|
895
|
+
)),
|
|
886
896
|
type: 'string'
|
|
887
897
|
},
|
|
888
898
|
shortTitle: {
|
|
889
|
-
markdownDescription: (
|
|
899
|
+
markdownDescription: ( localize(
|
|
890
900
|
'vscode.extension.contributes.commandType.shortTitle',
|
|
891
901
|
'(Optional) Short title by which the command is represented in the UI. Menus pick either `title` or `shortTitle` depending on the context in which they show commands.'
|
|
892
|
-
))
|
|
902
|
+
)),
|
|
893
903
|
type: 'string'
|
|
894
904
|
},
|
|
895
905
|
category: {
|
|
896
|
-
description: (
|
|
906
|
+
description: ( localize(
|
|
897
907
|
'vscode.extension.contributes.commandType.category',
|
|
898
908
|
'(Optional) Category string by which the command is grouped in the UI'
|
|
899
|
-
))
|
|
909
|
+
)),
|
|
900
910
|
type: 'string'
|
|
901
911
|
},
|
|
902
912
|
enablement: {
|
|
903
|
-
description: (
|
|
913
|
+
description: ( localize(
|
|
904
914
|
'vscode.extension.contributes.commandType.precondition',
|
|
905
915
|
'(Optional) Condition which must be true to enable the command in the UI (menu and keybindings). Does not prevent executing the command by other means, like the `executeCommand`-api.'
|
|
906
|
-
))
|
|
916
|
+
)),
|
|
907
917
|
type: 'string'
|
|
908
918
|
},
|
|
909
919
|
icon: {
|
|
910
|
-
description: (
|
|
920
|
+
description: ( localize(
|
|
911
921
|
{ key: 'vscode.extension.contributes.commandType.icon', comment: ['do not translate or change `\\$(zap)`, \\ in front of $ is important.'] },
|
|
912
922
|
'(Optional) Icon which is used to represent the command in the UI. Either a file path, an object with file paths for dark and light themes, or a theme icon references, like `\\$(zap)`'
|
|
913
|
-
))
|
|
923
|
+
)),
|
|
914
924
|
anyOf: [{
|
|
915
925
|
type: 'string'
|
|
916
926
|
},
|
|
@@ -918,17 +928,17 @@ var schema$1;
|
|
|
918
928
|
type: 'object',
|
|
919
929
|
properties: {
|
|
920
930
|
light: {
|
|
921
|
-
description: (
|
|
931
|
+
description: ( localize(
|
|
922
932
|
'vscode.extension.contributes.commandType.icon.light',
|
|
923
933
|
'Icon path when a light theme is used'
|
|
924
|
-
))
|
|
934
|
+
)),
|
|
925
935
|
type: 'string'
|
|
926
936
|
},
|
|
927
937
|
dark: {
|
|
928
|
-
description: (
|
|
938
|
+
description: ( localize(
|
|
929
939
|
'vscode.extension.contributes.commandType.icon.dark',
|
|
930
940
|
'Icon path when a dark theme is used'
|
|
931
|
-
))
|
|
941
|
+
)),
|
|
932
942
|
type: 'string'
|
|
933
943
|
}
|
|
934
944
|
}
|
|
@@ -937,10 +947,10 @@ var schema$1;
|
|
|
937
947
|
}
|
|
938
948
|
};
|
|
939
949
|
schema.commandsContribution = {
|
|
940
|
-
description: (
|
|
950
|
+
description: ( localize(
|
|
941
951
|
'vscode.extension.contributes.commands',
|
|
942
952
|
"Contributes commands to the command palette."
|
|
943
|
-
))
|
|
953
|
+
)),
|
|
944
954
|
oneOf: [
|
|
945
955
|
commandType,
|
|
946
956
|
{
|
|
@@ -949,12 +959,12 @@ var schema$1;
|
|
|
949
959
|
}
|
|
950
960
|
]
|
|
951
961
|
};
|
|
952
|
-
})(schema$1 || (schema$1 = {})))
|
|
953
|
-
const _commandRegistrations = (
|
|
954
|
-
const commandsExtensionPoint$1 = (
|
|
962
|
+
})(schema$1 || (schema$1 = {})));
|
|
963
|
+
const _commandRegistrations = ( new DisposableStore());
|
|
964
|
+
const commandsExtensionPoint$1 = ( ExtensionsRegistry.registerExtensionPoint({
|
|
955
965
|
extensionPoint: 'commands',
|
|
956
966
|
jsonSchema: schema$1.commandsContribution
|
|
957
|
-
}))
|
|
967
|
+
}));
|
|
958
968
|
commandsExtensionPoint$1.setHandler(extensions => {
|
|
959
969
|
function handleCommand(userFriendlyCommand, extension, bucket) {
|
|
960
970
|
if (!schema$1.isValidCommand(userFriendlyCommand, extension.collector)) {
|
|
@@ -974,11 +984,11 @@ commandsExtensionPoint$1.setHandler(extensions => {
|
|
|
974
984
|
}
|
|
975
985
|
}
|
|
976
986
|
if (MenuRegistry.getCommand(command)) {
|
|
977
|
-
extension.collector.info((
|
|
987
|
+
extension.collector.info(( localize(
|
|
978
988
|
'dup',
|
|
979
989
|
"Command `{0}` appears multiple times in the `commands` section.",
|
|
980
990
|
userFriendlyCommand.command
|
|
981
|
-
)))
|
|
991
|
+
)));
|
|
982
992
|
}
|
|
983
993
|
bucket.push({
|
|
984
994
|
id: command,
|
|
@@ -1006,11 +1016,11 @@ commandsExtensionPoint$1.setHandler(extensions => {
|
|
|
1006
1016
|
}
|
|
1007
1017
|
_commandRegistrations.add(MenuRegistry.addCommands(newCommands));
|
|
1008
1018
|
});
|
|
1009
|
-
const _submenus = (
|
|
1010
|
-
const submenusExtensionPoint = (
|
|
1019
|
+
const _submenus = ( new Map());
|
|
1020
|
+
const submenusExtensionPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
1011
1021
|
extensionPoint: 'submenus',
|
|
1012
1022
|
jsonSchema: schema$1.submenusContribution
|
|
1013
|
-
}))
|
|
1023
|
+
}));
|
|
1014
1024
|
submenusExtensionPoint.setHandler(extensions => {
|
|
1015
1025
|
_submenus.clear();
|
|
1016
1026
|
for (const extension of extensions) {
|
|
@@ -1020,27 +1030,27 @@ submenusExtensionPoint.setHandler(extensions => {
|
|
|
1020
1030
|
return;
|
|
1021
1031
|
}
|
|
1022
1032
|
if (!submenuInfo.id) {
|
|
1023
|
-
collector.warn((
|
|
1033
|
+
collector.warn(( localize(
|
|
1024
1034
|
'submenuId.invalid.id',
|
|
1025
1035
|
"`{0}` is not a valid submenu identifier",
|
|
1026
1036
|
submenuInfo.id
|
|
1027
|
-
)))
|
|
1037
|
+
)));
|
|
1028
1038
|
return;
|
|
1029
1039
|
}
|
|
1030
1040
|
if (_submenus.has(submenuInfo.id)) {
|
|
1031
|
-
collector.info((
|
|
1041
|
+
collector.info(( localize(
|
|
1032
1042
|
'submenuId.duplicate.id',
|
|
1033
1043
|
"The `{0}` submenu was already previously registered.",
|
|
1034
1044
|
submenuInfo.id
|
|
1035
|
-
)))
|
|
1045
|
+
)));
|
|
1036
1046
|
return;
|
|
1037
1047
|
}
|
|
1038
1048
|
if (!submenuInfo.label) {
|
|
1039
|
-
collector.warn((
|
|
1049
|
+
collector.warn(( localize(
|
|
1040
1050
|
'submenuId.invalid.label',
|
|
1041
1051
|
"`{0}` is not a valid submenu label",
|
|
1042
1052
|
submenuInfo.label
|
|
1043
|
-
)))
|
|
1053
|
+
)));
|
|
1044
1054
|
return;
|
|
1045
1055
|
}
|
|
1046
1056
|
let absoluteIcon;
|
|
@@ -1064,14 +1074,14 @@ submenusExtensionPoint.setHandler(extensions => {
|
|
|
1064
1074
|
}
|
|
1065
1075
|
}
|
|
1066
1076
|
});
|
|
1067
|
-
const _apiMenusByKey = (
|
|
1068
|
-
const _menuRegistrations = (
|
|
1069
|
-
const _submenuMenuItems = (
|
|
1070
|
-
const menusExtensionPoint = (
|
|
1077
|
+
const _apiMenusByKey = ( new Map(Iterable.map(Iterable.from(apiMenus), menu => ([menu.key, menu]))));
|
|
1078
|
+
const _menuRegistrations = ( new DisposableStore());
|
|
1079
|
+
const _submenuMenuItems = ( new Map());
|
|
1080
|
+
const menusExtensionPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
1071
1081
|
extensionPoint: 'menus',
|
|
1072
1082
|
jsonSchema: schema$1.menusContribution,
|
|
1073
1083
|
deps: [submenusExtensionPoint]
|
|
1074
|
-
}))
|
|
1084
|
+
}));
|
|
1075
1085
|
menusExtensionPoint.setHandler(extensions => {
|
|
1076
1086
|
_menuRegistrations.clear();
|
|
1077
1087
|
_submenuMenuItems.clear();
|
|
@@ -1097,13 +1107,13 @@ menusExtensionPoint.setHandler(extensions => {
|
|
|
1097
1107
|
continue;
|
|
1098
1108
|
}
|
|
1099
1109
|
if (menu.proposed && !isProposedApiEnabled(extension.description, menu.proposed)) {
|
|
1100
|
-
collector.error((
|
|
1110
|
+
collector.error(( localize(
|
|
1101
1111
|
'proposedAPI.invalid',
|
|
1102
1112
|
"{0} is a proposed menu identifier. It requires 'package.json#enabledApiProposals: [\"{1}\"]' and is only available when running out of dev or with the following command line switch: --enable-proposed-api {2}",
|
|
1103
1113
|
entry[0],
|
|
1104
1114
|
menu.proposed,
|
|
1105
1115
|
extension.description.identifier.value
|
|
1106
|
-
)))
|
|
1116
|
+
)));
|
|
1107
1117
|
continue;
|
|
1108
1118
|
}
|
|
1109
1119
|
for (const menuItem of entry[1]) {
|
|
@@ -1112,57 +1122,57 @@ menusExtensionPoint.setHandler(extensions => {
|
|
|
1112
1122
|
const command = MenuRegistry.getCommand(menuItem.command);
|
|
1113
1123
|
const alt = menuItem.alt && MenuRegistry.getCommand(menuItem.alt) || undefined;
|
|
1114
1124
|
if (!command) {
|
|
1115
|
-
collector.error((
|
|
1125
|
+
collector.error(( localize(
|
|
1116
1126
|
'missing.command',
|
|
1117
1127
|
"Menu item references a command `{0}` which is not defined in the 'commands' section.",
|
|
1118
1128
|
menuItem.command
|
|
1119
|
-
)))
|
|
1129
|
+
)));
|
|
1120
1130
|
continue;
|
|
1121
1131
|
}
|
|
1122
1132
|
if (menuItem.alt && !alt) {
|
|
1123
|
-
collector.warn((
|
|
1133
|
+
collector.warn(( localize(
|
|
1124
1134
|
'missing.altCommand',
|
|
1125
1135
|
"Menu item references an alt-command `{0}` which is not defined in the 'commands' section.",
|
|
1126
1136
|
menuItem.alt
|
|
1127
|
-
)))
|
|
1137
|
+
)));
|
|
1128
1138
|
}
|
|
1129
1139
|
if (menuItem.command === menuItem.alt) {
|
|
1130
|
-
collector.info((
|
|
1140
|
+
collector.info(( localize(
|
|
1131
1141
|
'dupe.command',
|
|
1132
1142
|
"Menu item references the same command as default and alt-command"
|
|
1133
|
-
)))
|
|
1143
|
+
)));
|
|
1134
1144
|
}
|
|
1135
1145
|
item = { command, alt, group: undefined, order: undefined, when: undefined };
|
|
1136
1146
|
}
|
|
1137
1147
|
else {
|
|
1138
1148
|
if (menu.supportsSubmenus === false) {
|
|
1139
|
-
collector.error((
|
|
1149
|
+
collector.error(( localize(
|
|
1140
1150
|
'unsupported.submenureference',
|
|
1141
1151
|
"Menu item references a submenu for a menu which doesn't have submenu support."
|
|
1142
|
-
)))
|
|
1152
|
+
)));
|
|
1143
1153
|
continue;
|
|
1144
1154
|
}
|
|
1145
1155
|
const submenu = _submenus.get(menuItem.submenu);
|
|
1146
1156
|
if (!submenu) {
|
|
1147
|
-
collector.error((
|
|
1157
|
+
collector.error(( localize(
|
|
1148
1158
|
'missing.submenu',
|
|
1149
1159
|
"Menu item references a submenu `{0}` which is not defined in the 'submenus' section.",
|
|
1150
1160
|
menuItem.submenu
|
|
1151
|
-
)))
|
|
1161
|
+
)));
|
|
1152
1162
|
continue;
|
|
1153
1163
|
}
|
|
1154
1164
|
let submenuRegistrations = _submenuMenuItems.get(menu.id.id);
|
|
1155
1165
|
if (!submenuRegistrations) {
|
|
1156
|
-
submenuRegistrations = (
|
|
1166
|
+
submenuRegistrations = ( new Set());
|
|
1157
1167
|
_submenuMenuItems.set(menu.id.id, submenuRegistrations);
|
|
1158
1168
|
}
|
|
1159
1169
|
if (submenuRegistrations.has(submenu.id.id)) {
|
|
1160
|
-
collector.warn((
|
|
1170
|
+
collector.warn(( localize(
|
|
1161
1171
|
'submenuItem.duplicate',
|
|
1162
1172
|
"The `{0}` submenu was already contributed to the `{1}` menu.",
|
|
1163
1173
|
menuItem.submenu,
|
|
1164
1174
|
entry[0]
|
|
1165
|
-
)))
|
|
1175
|
+
)));
|
|
1166
1176
|
continue;
|
|
1167
1177
|
}
|
|
1168
1178
|
submenuRegistrations.add(submenu.id.id);
|
|
@@ -1187,7 +1197,7 @@ menusExtensionPoint.setHandler(extensions => {
|
|
|
1187
1197
|
});
|
|
1188
1198
|
function getAllUnboundCommands(boundCommands) {
|
|
1189
1199
|
const unboundCommands = [];
|
|
1190
|
-
const seenMap = (
|
|
1200
|
+
const seenMap = ( new Map());
|
|
1191
1201
|
const addCommand = (id, includeCommandWithArgs) => {
|
|
1192
1202
|
if (seenMap.has(id)) {
|
|
1193
1203
|
return;
|
|
@@ -1216,7 +1226,7 @@ function getAllUnboundCommands(boundCommands) {
|
|
|
1216
1226
|
for (const editorAction of EditorExtensionsRegistry.getEditorActions()) {
|
|
1217
1227
|
addCommand(editorAction.id, true);
|
|
1218
1228
|
}
|
|
1219
|
-
for (const id of (
|
|
1229
|
+
for (const id of ( CommandsRegistry.getCommands().keys())) {
|
|
1220
1230
|
addCommand(id, false);
|
|
1221
1231
|
}
|
|
1222
1232
|
return unboundCommands;
|
|
@@ -1284,7 +1294,7 @@ class KeybindingParser {
|
|
|
1284
1294
|
static parseSimpleKeybinding(input) {
|
|
1285
1295
|
const mods = this._readModifiers(input);
|
|
1286
1296
|
const keyCode = KeyCodeUtils.fromUserSettings(mods.key);
|
|
1287
|
-
return [(
|
|
1297
|
+
return [( new SimpleKeybinding(mods.ctrl, mods.shift, mods.alt, mods.meta, keyCode)), mods.remains];
|
|
1288
1298
|
}
|
|
1289
1299
|
static parseKeybinding(input, OS) {
|
|
1290
1300
|
if (!input) {
|
|
@@ -1296,9 +1306,7 @@ class KeybindingParser {
|
|
|
1296
1306
|
[part, input] = this.parseSimpleKeybinding(input);
|
|
1297
1307
|
parts.push(part);
|
|
1298
1308
|
} while (input.length > 0);
|
|
1299
|
-
return (
|
|
1300
|
-
(new ChordKeybinding(parts))
|
|
1301
|
-
);
|
|
1309
|
+
return ( new ChordKeybinding(parts));
|
|
1302
1310
|
}
|
|
1303
1311
|
static parseSimpleUserBinding(input) {
|
|
1304
1312
|
const mods = this._readModifiers(input);
|
|
@@ -1306,10 +1314,10 @@ class KeybindingParser {
|
|
|
1306
1314
|
if (scanCodeMatch) {
|
|
1307
1315
|
const strScanCode = scanCodeMatch[1];
|
|
1308
1316
|
const scanCode = ScanCodeUtils.lowerCaseToEnum(strScanCode);
|
|
1309
|
-
return [(
|
|
1317
|
+
return [( new ScanCodeBinding(mods.ctrl, mods.shift, mods.alt, mods.meta, scanCode)), mods.remains];
|
|
1310
1318
|
}
|
|
1311
1319
|
const keyCode = KeyCodeUtils.fromUserSettings(mods.key);
|
|
1312
|
-
return [(
|
|
1320
|
+
return [( new SimpleKeybinding(mods.ctrl, mods.shift, mods.alt, mods.meta, keyCode)), mods.remains];
|
|
1313
1321
|
}
|
|
1314
1322
|
static parseUserBinding(input) {
|
|
1315
1323
|
if (!input) {
|
|
@@ -1363,7 +1371,7 @@ class KeybindingIO {
|
|
|
1363
1371
|
}
|
|
1364
1372
|
function rightPaddedString(str, minChars) {
|
|
1365
1373
|
if (str.length < minChars) {
|
|
1366
|
-
return str + ((
|
|
1374
|
+
return str + (( new Array(minChars - str.length)).join(' '));
|
|
1367
1375
|
}
|
|
1368
1376
|
return str;
|
|
1369
1377
|
}
|
|
@@ -1394,55 +1402,55 @@ function isContributedKeyBindingsArray(thing) {
|
|
|
1394
1402
|
}
|
|
1395
1403
|
function isValidContributedKeyBinding(keyBinding, rejects) {
|
|
1396
1404
|
if (!keyBinding) {
|
|
1397
|
-
rejects.push((
|
|
1405
|
+
rejects.push(( localize('nonempty', "expected non-empty value.")));
|
|
1398
1406
|
return false;
|
|
1399
1407
|
}
|
|
1400
1408
|
if (typeof keyBinding.command !== 'string') {
|
|
1401
|
-
rejects.push((
|
|
1409
|
+
rejects.push(( localize(
|
|
1402
1410
|
'requirestring',
|
|
1403
1411
|
"property `{0}` is mandatory and must be of type `string`",
|
|
1404
1412
|
'command'
|
|
1405
|
-
)))
|
|
1413
|
+
)));
|
|
1406
1414
|
return false;
|
|
1407
1415
|
}
|
|
1408
1416
|
if (keyBinding.key && typeof keyBinding.key !== 'string') {
|
|
1409
|
-
rejects.push((
|
|
1417
|
+
rejects.push(( localize(
|
|
1410
1418
|
'optstring',
|
|
1411
1419
|
"property `{0}` can be omitted or must be of type `string`",
|
|
1412
1420
|
'key'
|
|
1413
|
-
)))
|
|
1421
|
+
)));
|
|
1414
1422
|
return false;
|
|
1415
1423
|
}
|
|
1416
1424
|
if (keyBinding.when && typeof keyBinding.when !== 'string') {
|
|
1417
|
-
rejects.push((
|
|
1425
|
+
rejects.push(( localize(
|
|
1418
1426
|
'optstring',
|
|
1419
1427
|
"property `{0}` can be omitted or must be of type `string`",
|
|
1420
1428
|
'when'
|
|
1421
|
-
)))
|
|
1429
|
+
)));
|
|
1422
1430
|
return false;
|
|
1423
1431
|
}
|
|
1424
1432
|
if (keyBinding.mac && typeof keyBinding.mac !== 'string') {
|
|
1425
|
-
rejects.push((
|
|
1433
|
+
rejects.push(( localize(
|
|
1426
1434
|
'optstring',
|
|
1427
1435
|
"property `{0}` can be omitted or must be of type `string`",
|
|
1428
1436
|
'mac'
|
|
1429
|
-
)))
|
|
1437
|
+
)));
|
|
1430
1438
|
return false;
|
|
1431
1439
|
}
|
|
1432
1440
|
if (keyBinding.linux && typeof keyBinding.linux !== 'string') {
|
|
1433
|
-
rejects.push((
|
|
1441
|
+
rejects.push(( localize(
|
|
1434
1442
|
'optstring',
|
|
1435
1443
|
"property `{0}` can be omitted or must be of type `string`",
|
|
1436
1444
|
'linux'
|
|
1437
|
-
)))
|
|
1445
|
+
)));
|
|
1438
1446
|
return false;
|
|
1439
1447
|
}
|
|
1440
1448
|
if (keyBinding.win && typeof keyBinding.win !== 'string') {
|
|
1441
|
-
rejects.push((
|
|
1449
|
+
rejects.push(( localize(
|
|
1442
1450
|
'optstring',
|
|
1443
1451
|
"property `{0}` can be omitted or must be of type `string`",
|
|
1444
1452
|
'win'
|
|
1445
|
-
)))
|
|
1453
|
+
)));
|
|
1446
1454
|
return false;
|
|
1447
1455
|
}
|
|
1448
1456
|
return true;
|
|
@@ -1452,60 +1460,60 @@ const keybindingType = {
|
|
|
1452
1460
|
default: { command: '', key: '' },
|
|
1453
1461
|
properties: {
|
|
1454
1462
|
command: {
|
|
1455
|
-
description: (
|
|
1463
|
+
description: ( localize(
|
|
1456
1464
|
'vscode.extension.contributes.keybindings.command',
|
|
1457
1465
|
'Identifier of the command to run when keybinding is triggered.'
|
|
1458
|
-
))
|
|
1466
|
+
)),
|
|
1459
1467
|
type: 'string'
|
|
1460
1468
|
},
|
|
1461
1469
|
args: {
|
|
1462
|
-
description: (
|
|
1470
|
+
description: ( localize(
|
|
1463
1471
|
'vscode.extension.contributes.keybindings.args',
|
|
1464
1472
|
"Arguments to pass to the command to execute."
|
|
1465
|
-
))
|
|
1473
|
+
))
|
|
1466
1474
|
},
|
|
1467
1475
|
key: {
|
|
1468
|
-
description: (
|
|
1476
|
+
description: ( localize(
|
|
1469
1477
|
'vscode.extension.contributes.keybindings.key',
|
|
1470
1478
|
'Key or key sequence (separate keys with plus-sign and sequences with space, e.g. Ctrl+O and Ctrl+L L for a chord).'
|
|
1471
|
-
))
|
|
1479
|
+
)),
|
|
1472
1480
|
type: 'string'
|
|
1473
1481
|
},
|
|
1474
1482
|
mac: {
|
|
1475
|
-
description: (
|
|
1483
|
+
description: ( localize(
|
|
1476
1484
|
'vscode.extension.contributes.keybindings.mac',
|
|
1477
1485
|
'Mac specific key or key sequence.'
|
|
1478
|
-
))
|
|
1486
|
+
)),
|
|
1479
1487
|
type: 'string'
|
|
1480
1488
|
},
|
|
1481
1489
|
linux: {
|
|
1482
|
-
description: (
|
|
1490
|
+
description: ( localize(
|
|
1483
1491
|
'vscode.extension.contributes.keybindings.linux',
|
|
1484
1492
|
'Linux specific key or key sequence.'
|
|
1485
|
-
))
|
|
1493
|
+
)),
|
|
1486
1494
|
type: 'string'
|
|
1487
1495
|
},
|
|
1488
1496
|
win: {
|
|
1489
|
-
description: (
|
|
1497
|
+
description: ( localize(
|
|
1490
1498
|
'vscode.extension.contributes.keybindings.win',
|
|
1491
1499
|
'Windows specific key or key sequence.'
|
|
1492
|
-
))
|
|
1500
|
+
)),
|
|
1493
1501
|
type: 'string'
|
|
1494
1502
|
},
|
|
1495
1503
|
when: {
|
|
1496
|
-
description: (
|
|
1504
|
+
description: ( localize(
|
|
1497
1505
|
'vscode.extension.contributes.keybindings.when',
|
|
1498
1506
|
'Condition when the key is active.'
|
|
1499
|
-
))
|
|
1507
|
+
)),
|
|
1500
1508
|
type: 'string'
|
|
1501
1509
|
},
|
|
1502
1510
|
}
|
|
1503
1511
|
};
|
|
1504
|
-
const keybindingsExtPoint = (
|
|
1512
|
+
const keybindingsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
1505
1513
|
extensionPoint: 'keybindings',
|
|
1506
1514
|
deps: [commandsExtensionPoint$1],
|
|
1507
1515
|
jsonSchema: {
|
|
1508
|
-
description: (
|
|
1516
|
+
description: ( localize('vscode.extension.contributes.keybindings', "Contributes keybindings.")),
|
|
1509
1517
|
oneOf: [
|
|
1510
1518
|
keybindingType,
|
|
1511
1519
|
{
|
|
@@ -1514,7 +1522,7 @@ const keybindingsExtPoint = ( (ExtensionsRegistry.registerExtensionPoint({
|
|
|
1514
1522
|
}
|
|
1515
1523
|
]
|
|
1516
1524
|
}
|
|
1517
|
-
}))
|
|
1525
|
+
}));
|
|
1518
1526
|
const NUMPAD_PRINTABLE_SCANCODES = [
|
|
1519
1527
|
90 ,
|
|
1520
1528
|
91 ,
|
|
@@ -1532,7 +1540,7 @@ const NUMPAD_PRINTABLE_SCANCODES = [
|
|
|
1532
1540
|
104 ,
|
|
1533
1541
|
105
|
|
1534
1542
|
];
|
|
1535
|
-
const otherMacNumpadMapping = (
|
|
1543
|
+
const otherMacNumpadMapping = ( new Map());
|
|
1536
1544
|
otherMacNumpadMapping.set(95 , 22 );
|
|
1537
1545
|
otherMacNumpadMapping.set(96 , 23 );
|
|
1538
1546
|
otherMacNumpadMapping.set(97 , 24 );
|
|
@@ -1567,7 +1575,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1567
1575
|
this.updateResolver();
|
|
1568
1576
|
});
|
|
1569
1577
|
this._cachedResolver = null;
|
|
1570
|
-
this.userKeybindings = this._register((
|
|
1578
|
+
this.userKeybindings = this._register(( new UserKeybindings(userDataProfileService, fileService, logService)));
|
|
1571
1579
|
this.userKeybindings.initialize().then(() => {
|
|
1572
1580
|
if (this.userKeybindings.keybindings.length) {
|
|
1573
1581
|
this.updateResolver();
|
|
@@ -1589,7 +1597,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1589
1597
|
this._register(extensionService.onDidRegisterExtensions(() => this.updateSchema()));
|
|
1590
1598
|
this._register(addDisposableListener(window, EventType.KEY_DOWN, (e) => {
|
|
1591
1599
|
this.isComposingGlobalContextKey.set(e.isComposing);
|
|
1592
|
-
const keyEvent = (
|
|
1600
|
+
const keyEvent = ( new StandardKeyboardEvent(e));
|
|
1593
1601
|
this._log(`/ Received keydown event - ${printKeyboardEvent(e)}`);
|
|
1594
1602
|
this._log(`| Converted keydown event - ${printStandardKeyboardEvent(keyEvent)}`);
|
|
1595
1603
|
const shouldPreventDefault = this._dispatch(keyEvent, keyEvent.target);
|
|
@@ -1600,7 +1608,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1600
1608
|
}));
|
|
1601
1609
|
this._register(addDisposableListener(window, EventType.KEY_UP, (e) => {
|
|
1602
1610
|
this.isComposingGlobalContextKey.set(e.isComposing);
|
|
1603
|
-
const keyEvent = (
|
|
1611
|
+
const keyEvent = ( new StandardKeyboardEvent(e));
|
|
1604
1612
|
const shouldPreventDefault = this._singleModifierDispatch(keyEvent, keyEvent.target);
|
|
1605
1613
|
if (shouldPreventDefault) {
|
|
1606
1614
|
keyEvent.preventDefault();
|
|
@@ -1635,13 +1643,9 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1635
1643
|
_printUserBinding(parts) {
|
|
1636
1644
|
return UserSettingsLabelProvider.toLabel(OS, parts, (part) => {
|
|
1637
1645
|
if (part instanceof SimpleKeybinding) {
|
|
1638
|
-
return (
|
|
1639
|
-
(KeyCodeUtils.toString(part.keyCode))
|
|
1640
|
-
);
|
|
1646
|
+
return ( KeyCodeUtils.toString(part.keyCode));
|
|
1641
1647
|
}
|
|
1642
|
-
return (
|
|
1643
|
-
(ScanCodeUtils.toString(part.scanCode))
|
|
1644
|
-
);
|
|
1648
|
+
return ( ScanCodeUtils.toString(part.scanCode));
|
|
1645
1649
|
}) || '[null]';
|
|
1646
1650
|
}
|
|
1647
1651
|
_printResolvedKeybinding(resolvedKeybinding) {
|
|
@@ -1661,7 +1665,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1661
1665
|
}
|
|
1662
1666
|
}
|
|
1663
1667
|
_dumpResolveKeybindingDebugInfo() {
|
|
1664
|
-
const seenBindings = (
|
|
1668
|
+
const seenBindings = ( new Set());
|
|
1665
1669
|
const result = [];
|
|
1666
1670
|
result.push(`Default Resolved Keybindings (unique only):`);
|
|
1667
1671
|
for (const item of KeybindingsRegistry.getDefaultKeybindings()) {
|
|
@@ -1717,7 +1721,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1717
1721
|
if (!this._cachedResolver) {
|
|
1718
1722
|
const defaults = this._resolveKeybindingItems(KeybindingsRegistry.getDefaultKeybindings(), true);
|
|
1719
1723
|
const overrides = this._resolveUserKeybindingItems(this.userKeybindings.keybindings.map((k) => KeybindingIO.readUserKeybindingItem(k)), false);
|
|
1720
|
-
this._cachedResolver = (
|
|
1724
|
+
this._cachedResolver = ( new KeybindingResolver(defaults, overrides, (str) => this._log(str)));
|
|
1721
1725
|
}
|
|
1722
1726
|
return this._cachedResolver;
|
|
1723
1727
|
}
|
|
@@ -1731,7 +1735,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1731
1735
|
const when = item.when || undefined;
|
|
1732
1736
|
const keybinding = item.keybinding;
|
|
1733
1737
|
if (!keybinding) {
|
|
1734
|
-
result[resultLen++] = (
|
|
1738
|
+
result[resultLen++] = ( new ResolvedKeybindingItem(
|
|
1735
1739
|
undefined,
|
|
1736
1740
|
item.command,
|
|
1737
1741
|
item.commandArgs,
|
|
@@ -1739,7 +1743,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1739
1743
|
isDefault,
|
|
1740
1744
|
item.extensionId,
|
|
1741
1745
|
item.isBuiltinExtension
|
|
1742
|
-
))
|
|
1746
|
+
));
|
|
1743
1747
|
}
|
|
1744
1748
|
else {
|
|
1745
1749
|
if (this._assertBrowserConflicts(keybinding, item.command)) {
|
|
@@ -1748,7 +1752,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1748
1752
|
const resolvedKeybindings = this._keyboardMapper.resolveUserBinding(keybinding);
|
|
1749
1753
|
for (let i = resolvedKeybindings.length - 1; i >= 0; i--) {
|
|
1750
1754
|
const resolvedKeybinding = resolvedKeybindings[i];
|
|
1751
|
-
result[resultLen++] = (
|
|
1755
|
+
result[resultLen++] = ( new ResolvedKeybindingItem(
|
|
1752
1756
|
resolvedKeybinding,
|
|
1753
1757
|
item.command,
|
|
1754
1758
|
item.commandArgs,
|
|
@@ -1756,7 +1760,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1756
1760
|
isDefault,
|
|
1757
1761
|
item.extensionId,
|
|
1758
1762
|
item.isBuiltinExtension
|
|
1759
|
-
))
|
|
1763
|
+
));
|
|
1760
1764
|
}
|
|
1761
1765
|
}
|
|
1762
1766
|
}
|
|
@@ -1769,12 +1773,12 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1769
1773
|
const when = item.when || undefined;
|
|
1770
1774
|
const parts = item.parts;
|
|
1771
1775
|
if (parts.length === 0) {
|
|
1772
|
-
result[resultLen++] = (
|
|
1776
|
+
result[resultLen++] = ( new ResolvedKeybindingItem(undefined, item.command, item.commandArgs, when, isDefault, null, false));
|
|
1773
1777
|
}
|
|
1774
1778
|
else {
|
|
1775
1779
|
const resolvedKeybindings = this._keyboardMapper.resolveUserBinding(parts);
|
|
1776
1780
|
for (const resolvedKeybinding of resolvedKeybindings) {
|
|
1777
|
-
result[resultLen++] = (
|
|
1781
|
+
result[resultLen++] = ( new ResolvedKeybindingItem(
|
|
1778
1782
|
resolvedKeybinding,
|
|
1779
1783
|
item.command,
|
|
1780
1784
|
item.commandArgs,
|
|
@@ -1782,7 +1786,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1782
1786
|
isDefault,
|
|
1783
1787
|
null,
|
|
1784
1788
|
false
|
|
1785
|
-
))
|
|
1789
|
+
));
|
|
1786
1790
|
}
|
|
1787
1791
|
}
|
|
1788
1792
|
}
|
|
@@ -1862,12 +1866,12 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1862
1866
|
}
|
|
1863
1867
|
}
|
|
1864
1868
|
if (rejects.length > 0) {
|
|
1865
|
-
collector.error((
|
|
1869
|
+
collector.error(( localize(
|
|
1866
1870
|
'invalid.keybindings',
|
|
1867
1871
|
"Invalid `contributes.{0}`: {1}",
|
|
1868
1872
|
keybindingsExtPoint.name,
|
|
1869
1873
|
rejects.join('\n')
|
|
1870
|
-
)))
|
|
1874
|
+
)));
|
|
1871
1875
|
}
|
|
1872
1876
|
}
|
|
1873
1877
|
static bindToCurrentPlatform(key, mac, linux, win) {
|
|
@@ -1933,7 +1937,7 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1933
1937
|
+ WorkbenchKeybindingService._getAllCommandsAsComment(boundCommands));
|
|
1934
1938
|
}
|
|
1935
1939
|
static _getDefaultKeybindings(defaultKeybindings) {
|
|
1936
|
-
const out = (
|
|
1940
|
+
const out = ( new OutputBuilder());
|
|
1937
1941
|
out.writeLine('[');
|
|
1938
1942
|
const lastIndex = defaultKeybindings.length - 1;
|
|
1939
1943
|
defaultKeybindings.forEach((k, index) => {
|
|
@@ -1946,14 +1950,12 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1946
1950
|
}
|
|
1947
1951
|
});
|
|
1948
1952
|
out.writeLine(']');
|
|
1949
|
-
return (
|
|
1950
|
-
(out.toString())
|
|
1951
|
-
);
|
|
1953
|
+
return ( out.toString());
|
|
1952
1954
|
}
|
|
1953
1955
|
static _getAllCommandsAsComment(boundCommands) {
|
|
1954
1956
|
const unboundCommands = getAllUnboundCommands(boundCommands);
|
|
1955
1957
|
const pretty = unboundCommands.sort().join('\n// - ');
|
|
1956
|
-
return '// ' + (
|
|
1958
|
+
return '// ' + ( localize('unboundCommands', "Here are other available commands: ")) + '\n// - ' + pretty;
|
|
1957
1959
|
}
|
|
1958
1960
|
mightProducePrintableCharacter(event) {
|
|
1959
1961
|
if (event.ctrlKey || event.metaKey || event.altKey) {
|
|
@@ -1987,40 +1989,40 @@ let WorkbenchKeybindingService = class WorkbenchKeybindingService extends Abstra
|
|
|
1987
1989
|
return true;
|
|
1988
1990
|
}
|
|
1989
1991
|
};
|
|
1990
|
-
WorkbenchKeybindingService = (
|
|
1991
|
-
(
|
|
1992
|
-
(
|
|
1993
|
-
(
|
|
1994
|
-
(
|
|
1995
|
-
(
|
|
1996
|
-
(
|
|
1997
|
-
(
|
|
1998
|
-
(
|
|
1999
|
-
(
|
|
2000
|
-
(
|
|
2001
|
-
(
|
|
2002
|
-
], WorkbenchKeybindingService))
|
|
1992
|
+
WorkbenchKeybindingService = ( __decorate([
|
|
1993
|
+
( __param(0, IContextKeyService)),
|
|
1994
|
+
( __param(1, ICommandService)),
|
|
1995
|
+
( __param(2, ITelemetryService)),
|
|
1996
|
+
( __param(3, INotificationService)),
|
|
1997
|
+
( __param(4, IUserDataProfileService)),
|
|
1998
|
+
( __param(5, IConfigurationService)),
|
|
1999
|
+
( __param(6, IHostService)),
|
|
2000
|
+
( __param(7, IExtensionService)),
|
|
2001
|
+
( __param(8, IFileService)),
|
|
2002
|
+
( __param(9, ILogService)),
|
|
2003
|
+
( __param(10, IKeyboardLayoutService))
|
|
2004
|
+
], WorkbenchKeybindingService));
|
|
2003
2005
|
class UserKeybindings extends Disposable {
|
|
2004
2006
|
constructor(userDataProfileService, fileService, logService) {
|
|
2005
2007
|
super();
|
|
2006
2008
|
this.userDataProfileService = userDataProfileService;
|
|
2007
2009
|
this.fileService = fileService;
|
|
2008
2010
|
this._keybindings = [];
|
|
2009
|
-
this.watchDisposables = this._register((
|
|
2010
|
-
this._onDidChange = this._register((
|
|
2011
|
+
this.watchDisposables = this._register(( new DisposableStore()));
|
|
2012
|
+
this._onDidChange = this._register(( new Emitter()));
|
|
2011
2013
|
this.onDidChange = this._onDidChange.event;
|
|
2012
2014
|
this.watch();
|
|
2013
|
-
this.reloadConfigurationScheduler = this._register((
|
|
2015
|
+
this.reloadConfigurationScheduler = this._register(( new RunOnceScheduler(() => this.reload().then(changed => {
|
|
2014
2016
|
if (changed) {
|
|
2015
2017
|
this._onDidChange.fire();
|
|
2016
2018
|
}
|
|
2017
|
-
}), 50)))
|
|
2019
|
+
}), 50)));
|
|
2018
2020
|
this._register(Event.filter(this.fileService.onDidFilesChange, e => e.contains(this.userDataProfileService.currentProfile.keybindingsResource))(() => {
|
|
2019
2021
|
logService.debug('Keybindings file changed');
|
|
2020
2022
|
this.reloadConfigurationScheduler.schedule();
|
|
2021
2023
|
}));
|
|
2022
2024
|
this._register(this.fileService.onDidRunOperation((e) => {
|
|
2023
|
-
if (e.operation === 4 && (
|
|
2025
|
+
if (e.operation === 4 && ( e.resource.toString()) === ( this.userDataProfileService.currentProfile.keybindingsResource.toString())) {
|
|
2024
2026
|
logService.debug('Keybindings file written');
|
|
2025
2027
|
this.reloadConfigurationScheduler.schedule();
|
|
2026
2028
|
}
|
|
@@ -2049,7 +2051,7 @@ class UserKeybindings extends Disposable {
|
|
|
2049
2051
|
const existing = this._keybindings;
|
|
2050
2052
|
try {
|
|
2051
2053
|
const content = await this.fileService.readFile(this.userDataProfileService.currentProfile.keybindingsResource);
|
|
2052
|
-
const value = parse((
|
|
2054
|
+
const value = parse(( content.value.toString()));
|
|
2053
2055
|
this._keybindings = isArray(value) ? value : [];
|
|
2054
2056
|
}
|
|
2055
2057
|
catch (e) {
|
|
@@ -2065,7 +2067,7 @@ const commandsEnumDescriptions = [];
|
|
|
2065
2067
|
const schema = {
|
|
2066
2068
|
id: schemaId,
|
|
2067
2069
|
type: 'array',
|
|
2068
|
-
title: (
|
|
2070
|
+
title: ( localize('keybindings.json.title', "Keybindings configuration")),
|
|
2069
2071
|
allowTrailingCommas: true,
|
|
2070
2072
|
allowComments: true,
|
|
2071
2073
|
definitions: {
|
|
@@ -2093,7 +2095,7 @@ const schema = {
|
|
|
2093
2095
|
'properties': {
|
|
2094
2096
|
'key': {
|
|
2095
2097
|
'type': 'string',
|
|
2096
|
-
'description': (
|
|
2098
|
+
'description': ( localize('keybindings.json.key', "Key or key sequence (separated by space)")),
|
|
2097
2099
|
},
|
|
2098
2100
|
'command': {
|
|
2099
2101
|
'anyOf': [
|
|
@@ -2101,7 +2103,7 @@ const schema = {
|
|
|
2101
2103
|
'type': 'string',
|
|
2102
2104
|
'enum': commandsEnum,
|
|
2103
2105
|
'enumDescriptions': commandsEnumDescriptions,
|
|
2104
|
-
'description': (
|
|
2106
|
+
'description': ( localize('keybindings.json.command', "Name of the command to execute")),
|
|
2105
2107
|
},
|
|
2106
2108
|
{
|
|
2107
2109
|
'type': 'string'
|
|
@@ -2110,22 +2112,22 @@ const schema = {
|
|
|
2110
2112
|
},
|
|
2111
2113
|
'when': {
|
|
2112
2114
|
'type': 'string',
|
|
2113
|
-
'description': (
|
|
2115
|
+
'description': ( localize('keybindings.json.when', "Condition when the key is active."))
|
|
2114
2116
|
},
|
|
2115
2117
|
'args': {
|
|
2116
|
-
'description': (
|
|
2118
|
+
'description': ( localize('keybindings.json.args', "Arguments to pass to the command to execute."))
|
|
2117
2119
|
}
|
|
2118
2120
|
},
|
|
2119
2121
|
'allOf': commandsSchemas
|
|
2120
2122
|
}
|
|
2121
2123
|
};
|
|
2122
|
-
const schemaRegistry = (
|
|
2124
|
+
const schemaRegistry = ( Registry.as(Extensions.JSONContribution));
|
|
2123
2125
|
schemaRegistry.registerSchema(schemaId, schema);
|
|
2124
2126
|
function updateSchema(additionalContributions) {
|
|
2125
2127
|
commandsSchemas.length = 0;
|
|
2126
2128
|
commandsEnum.length = 0;
|
|
2127
2129
|
commandsEnumDescriptions.length = 0;
|
|
2128
|
-
const knownCommands = (
|
|
2130
|
+
const knownCommands = ( new Set());
|
|
2129
2131
|
const addKnownCommand = (commandId, description) => {
|
|
2130
2132
|
if (!/^_/.test(commandId)) {
|
|
2131
2133
|
if (!knownCommands.has(commandId)) {
|
|
@@ -2164,28 +2166,28 @@ function updateSchema(additionalContributions) {
|
|
|
2164
2166
|
commandsSchemas.push(addition);
|
|
2165
2167
|
}
|
|
2166
2168
|
const menuCommands = MenuRegistry.getCommands();
|
|
2167
|
-
for (const commandId of (
|
|
2169
|
+
for (const commandId of ( menuCommands.keys())) {
|
|
2168
2170
|
addKnownCommand(commandId);
|
|
2169
2171
|
}
|
|
2170
2172
|
commandsSchemas.push(...additionalContributions);
|
|
2171
2173
|
schemaRegistry.notifySchemaChanged(schemaId);
|
|
2172
2174
|
}
|
|
2173
|
-
const configurationRegistry = (
|
|
2175
|
+
const configurationRegistry = ( Registry.as(Extensions$1.Configuration));
|
|
2174
2176
|
const keyboardConfiguration = {
|
|
2175
2177
|
'id': 'keyboard',
|
|
2176
2178
|
'order': 15,
|
|
2177
2179
|
'type': 'object',
|
|
2178
|
-
'title': (
|
|
2180
|
+
'title': ( localize('keyboardConfigurationTitle', "Keyboard")),
|
|
2179
2181
|
'properties': {
|
|
2180
2182
|
'keyboard.dispatch': {
|
|
2181
2183
|
scope: 1 ,
|
|
2182
2184
|
type: 'string',
|
|
2183
2185
|
enum: ['code', 'keyCode'],
|
|
2184
2186
|
default: 'code',
|
|
2185
|
-
markdownDescription: (
|
|
2187
|
+
markdownDescription: ( localize(
|
|
2186
2188
|
'dispatch',
|
|
2187
2189
|
"Controls the dispatching logic for key presses to use either `code` (recommended) or `keyCode`."
|
|
2188
|
-
))
|
|
2190
|
+
)),
|
|
2189
2191
|
included: OS === 2 || OS === 3
|
|
2190
2192
|
}
|
|
2191
2193
|
}
|
|
@@ -2196,7 +2198,7 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
2196
2198
|
super({
|
|
2197
2199
|
showAlias: !Language.isDefaultVariant(),
|
|
2198
2200
|
noResultsPick: {
|
|
2199
|
-
label: (
|
|
2201
|
+
label: ( localize('noCommandResults', "No matching commands")),
|
|
2200
2202
|
commandId: ''
|
|
2201
2203
|
}
|
|
2202
2204
|
}, instantiationService, keybindingService, commandService, telemetryService, dialogService);
|
|
@@ -2236,7 +2238,7 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
2236
2238
|
...c,
|
|
2237
2239
|
buttons: [{
|
|
2238
2240
|
iconClass: Codicon.gear.classNames,
|
|
2239
|
-
tooltip: (
|
|
2241
|
+
tooltip: ( localize('configure keybinding', "Configure Keybinding")),
|
|
2240
2242
|
}],
|
|
2241
2243
|
trigger: () => {
|
|
2242
2244
|
this.preferencesService.openGlobalKeybindingSettings(false, { query: `@command:${c.commandId}` });
|
|
@@ -2255,7 +2257,7 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
2255
2257
|
let label = (typeof action.item.title === 'string' ? action.item.title : action.item.title.value) || action.item.id;
|
|
2256
2258
|
const category = typeof action.item.category === 'string' ? action.item.category : action.item.category?.value;
|
|
2257
2259
|
if (category) {
|
|
2258
|
-
label = (
|
|
2260
|
+
label = ( localize('commandWithCategory', "{0}: {1}", category, label));
|
|
2259
2261
|
}
|
|
2260
2262
|
const aliasLabel = typeof action.item.title !== 'string' ? action.item.title.original : undefined;
|
|
2261
2263
|
const aliasCategory = (category && action.item.category && typeof action.item.category !== 'string') ? action.item.category.original : undefined;
|
|
@@ -2273,19 +2275,68 @@ let CommandsQuickAccessProvider = class CommandsQuickAccessProvider extends Abst
|
|
|
2273
2275
|
return globalCommandPicks;
|
|
2274
2276
|
}
|
|
2275
2277
|
};
|
|
2276
|
-
CommandsQuickAccessProvider = (
|
|
2277
|
-
(
|
|
2278
|
-
(
|
|
2279
|
-
(
|
|
2280
|
-
(
|
|
2281
|
-
(
|
|
2282
|
-
(
|
|
2283
|
-
(
|
|
2284
|
-
(
|
|
2285
|
-
(
|
|
2286
|
-
(
|
|
2287
|
-
(
|
|
2288
|
-
], CommandsQuickAccessProvider))
|
|
2278
|
+
CommandsQuickAccessProvider = ( __decorate([
|
|
2279
|
+
( __param(0, IEditorService)),
|
|
2280
|
+
( __param(1, IMenuService)),
|
|
2281
|
+
( __param(2, IExtensionService)),
|
|
2282
|
+
( __param(3, IInstantiationService)),
|
|
2283
|
+
( __param(4, IKeybindingService)),
|
|
2284
|
+
( __param(5, ICommandService)),
|
|
2285
|
+
( __param(6, ITelemetryService)),
|
|
2286
|
+
( __param(7, IDialogService)),
|
|
2287
|
+
( __param(8, IConfigurationService)),
|
|
2288
|
+
( __param(9, IEditorGroupsService)),
|
|
2289
|
+
( __param(10, IPreferencesService))
|
|
2290
|
+
], CommandsQuickAccessProvider));
|
|
2291
|
+
class ShowAllCommandsAction extends Action2 {
|
|
2292
|
+
constructor() {
|
|
2293
|
+
super({
|
|
2294
|
+
id: ShowAllCommandsAction.ID,
|
|
2295
|
+
title: { value: ( localize('showTriggerActions', "Show All Commands")), original: 'Show All Commands' },
|
|
2296
|
+
keybinding: {
|
|
2297
|
+
weight: 200 ,
|
|
2298
|
+
when: undefined,
|
|
2299
|
+
primary: !isFirefox ? ((2048 | 1024 | 46) ) : undefined,
|
|
2300
|
+
secondary: [59 ]
|
|
2301
|
+
},
|
|
2302
|
+
f1: true
|
|
2303
|
+
});
|
|
2304
|
+
}
|
|
2305
|
+
async run(accessor) {
|
|
2306
|
+
accessor.get(IQuickInputService).quickAccess.show(CommandsQuickAccessProvider.PREFIX);
|
|
2307
|
+
}
|
|
2308
|
+
}
|
|
2309
|
+
ShowAllCommandsAction.ID = 'workbench.action.showCommands';
|
|
2310
|
+
class ClearCommandHistoryAction extends Action2 {
|
|
2311
|
+
constructor() {
|
|
2312
|
+
super({
|
|
2313
|
+
id: 'workbench.action.clearCommandHistory',
|
|
2314
|
+
title: { value: ( localize('clearCommandHistory', "Clear Command History")), original: 'Clear Command History' },
|
|
2315
|
+
f1: true
|
|
2316
|
+
});
|
|
2317
|
+
}
|
|
2318
|
+
async run(accessor) {
|
|
2319
|
+
const configurationService = accessor.get(IConfigurationService);
|
|
2320
|
+
const storageService = accessor.get(IStorageService);
|
|
2321
|
+
const dialogService = accessor.get(IDialogService);
|
|
2322
|
+
const commandHistoryLength = CommandsHistory.getConfiguredCommandHistoryLength(configurationService);
|
|
2323
|
+
if (commandHistoryLength > 0) {
|
|
2324
|
+
const { confirmed } = await dialogService.confirm({
|
|
2325
|
+
message: ( localize(
|
|
2326
|
+
'confirmClearMessage',
|
|
2327
|
+
"Do you want to clear the history of recently used commands?"
|
|
2328
|
+
)),
|
|
2329
|
+
detail: ( localize('confirmClearDetail', "This action is irreversible!")),
|
|
2330
|
+
primaryButton: ( localize({ key: 'clearButtonLabel', comment: ['&& denotes a mnemonic'] }, "&&Clear")),
|
|
2331
|
+
type: 'warning'
|
|
2332
|
+
});
|
|
2333
|
+
if (!confirmed) {
|
|
2334
|
+
return;
|
|
2335
|
+
}
|
|
2336
|
+
CommandsHistory.clearHistory(configurationService, storageService);
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2289
2340
|
let DelegateStandaloneKeybindingService = class DelegateStandaloneKeybindingService extends createInjectedClass(StandaloneKeybindingService) {
|
|
2290
2341
|
constructor(instantiationService) {
|
|
2291
2342
|
super(instantiationService);
|
|
@@ -2307,10 +2358,10 @@ let DelegateStandaloneKeybindingService = class DelegateStandaloneKeybindingServ
|
|
|
2307
2358
|
return this._cachedOverridenResolver;
|
|
2308
2359
|
}
|
|
2309
2360
|
};
|
|
2310
|
-
DelegateStandaloneKeybindingService =
|
|
2311
|
-
|
|
2312
|
-
], DelegateStandaloneKeybindingService)
|
|
2313
|
-
const quickAccessRegistry =
|
|
2361
|
+
DelegateStandaloneKeybindingService = __decorate([
|
|
2362
|
+
__param(0, IInstantiationService)
|
|
2363
|
+
], DelegateStandaloneKeybindingService);
|
|
2364
|
+
const quickAccessRegistry = Registry.as(Extensions$2.Quickaccess);
|
|
2314
2365
|
const provider = quickAccessRegistry.getQuickAccessProviders().find(provider => provider.ctor === StandaloneCommandsQuickAccessProvider);
|
|
2315
2366
|
if (provider != null) {
|
|
2316
2367
|
provider.ctor = class extends CommandsQuickAccessProvider {
|
|
@@ -2346,7 +2397,7 @@ function updateUserKeybindings(keybindingsJson) {
|
|
|
2346
2397
|
function getServiceOverride() {
|
|
2347
2398
|
return {
|
|
2348
2399
|
...getServiceOverride$1(),
|
|
2349
|
-
[
|
|
2400
|
+
[IKeybindingService.toString()]: new SyncDescriptor(DelegateStandaloneKeybindingService)
|
|
2350
2401
|
};
|
|
2351
2402
|
}
|
|
2352
2403
|
export { getServiceOverride as default, setCommands, setKeybindings, updateUserKeybindings };
|