@codingame/monaco-vscode-api 1.83.5 → 1.83.7
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/assets.js +3 -14
- package/lifecycle.js +3 -1
- package/missing-services.js +32 -28
- package/monaco-editor-treemending.patch +26330 -3867
- package/monaco.js +4 -0
- package/package.json +1 -1
- package/service-override/extensions.js +5 -5
- package/service-override/files.js +37 -13
- package/service-override/keybindings.js +10 -4
- package/service-override/layout.js +1 -3
- package/services.d.ts +13 -2
- package/services.js +35 -5
- package/vscode/src/vs/base/browser/broadcast.js +52 -0
- package/vscode/src/vs/base/browser/ui/menu/menubar.js +1 -1
- package/vscode/src/vs/base/browser/ui/splitview/paneview.js +6 -1
- package/vscode/src/vs/base/common/date.js +244 -54
- package/vscode/src/vs/base/common/jsonErrorMessages.js +45 -9
- package/vscode/src/vs/editor/common/services/textResourceConfiguration.d.ts +65 -0
- package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +33 -5
- package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +165 -32
- package/vscode/src/vs/platform/dialogs/common/dialogs.js +30 -9
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +0 -3
- package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +6 -1
- package/vscode/src/vs/platform/files/browser/indexedDBFileSystemProvider.js +404 -0
- package/vscode/src/vs/platform/files/common/fileService.js +13 -2
- package/vscode/src/vs/platform/files/common/files.js +25 -5
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardConfig.js +15 -3
- package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.js +38 -7
- package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.js +7 -1
- package/vscode/src/vs/platform/request/common/request.js +1 -1
- package/vscode/src/vs/platform/theme/common/tokenClassificationRegistry.js +210 -42
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +73 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +5 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +11 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +70 -35
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +108 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +17 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +7 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +14 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +12 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +6 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +32 -5
- package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +0 -60
- package/vscode/src/vs/workbench/api/common/extHostChat.js +11 -2
- package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +12 -2
- package/vscode/src/vs/workbench/api/common/extHostLogService.js +9 -1
- package/vscode/src/vs/workbench/api/common/extHostProgress.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +11 -2
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +10 -2
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +7 -1
- package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +49 -9
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +397 -274
- package/vscode/src/vs/workbench/browser/actions/quickAccessActions.js +30 -6
- package/vscode/src/vs/workbench/browser/actions/windowActions.js +85 -31
- package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +56 -102
- package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +5 -1
- package/vscode/src/vs/workbench/browser/editor.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +55 -11
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +63 -11
- package/vscode/src/vs/workbench/browser/parts/editor/binaryDiffEditor.js +7 -1
- package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +15 -3
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.js +205 -41
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +617 -139
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +578 -114
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +96 -20
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +30 -6
- package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +46 -9
- package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +30 -5
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +309 -59
- package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +5 -1
- package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +5 -1
- package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +16 -3
- package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +35 -7
- package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +185 -33
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +90 -57
- package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +5 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +16 -3
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +26 -6
- package/vscode/src/vs/workbench/browser/parts/views/viewsService.js +35 -6
- package/vscode/src/vs/workbench/browser/quickaccess.js +6 -6
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +918 -185
- package/vscode/src/vs/workbench/common/configuration.js +25 -11
- package/vscode/src/vs/workbench/common/contextkeys.js +244 -228
- package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +7 -1
- package/vscode/src/vs/workbench/common/editor/resourceEditorInput.d.ts +44 -0
- package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +7 -1
- package/vscode/src/vs/workbench/common/editor/textEditorModel.js +6 -1
- package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.d.ts +23 -0
- package/vscode/src/vs/workbench/common/editor.d.ts +26 -1
- package/vscode/src/vs/workbench/common/editor.js +26 -5
- package/vscode/src/vs/workbench/common/theme.js +676 -136
- package/vscode/src/vs/workbench/common/views.js +8 -3
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +71 -14
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +21 -2
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +133 -21
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +36 -8
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +96 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +0 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +22 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +22 -4
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +41 -8
- package/vscode/src/vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint.js +25 -5
- package/vscode/src/vs/workbench/contrib/codeActions/common/documentationExtensionPoint.js +30 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +34 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/editorFeatures.js +44 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +10 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +320 -63
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +12 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +15 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +30 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +25 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +10 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +20 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +10 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +10 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +25 -9
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +30 -6
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +25 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +16 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +8 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +23 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +15 -9
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +18 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/comments.contribution.js +142 -26
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +33 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +45 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +63 -10
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +45 -9
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +16 -8
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +41 -21
- package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +5 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +5 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +60 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +275 -55
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +7 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +255 -94
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +120 -24
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +22 -4
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +21 -4
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +39 -51
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +394 -75
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +17 -6
- package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +190 -32
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +5 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +21 -4
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +26 -5
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +81 -14
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +26 -5
- package/vscode/src/vs/workbench/contrib/files/common/files.js +70 -26
- package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +11 -3
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +5 -1
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +20 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +75 -111
- package/vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js +5 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +6 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +151 -29
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +10 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +0 -42
- package/vscode/src/vs/workbench/contrib/output/browser/output.contribution.js +115 -23
- package/vscode/src/vs/workbench/contrib/output/browser/outputView.js +17 -3
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +49 -9
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +66 -13
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +52 -10
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtyDiffSwitcher.js +10 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +110 -26
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +21 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +15 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +56 -9
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +25 -5
- package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +16 -26
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +7 -8
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +20 -4
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +35 -7
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +106 -21
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +81 -21
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +6 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +6 -2
- package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +592 -112
- package/vscode/src/vs/workbench/services/assignment/common/assignmentService.js +5 -1
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +6 -32
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +5 -1
- package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +5 -1
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +5 -1
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +15 -3
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +58 -10
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +5 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +392 -80
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +28 -5
- package/vscode/src/vs/workbench/services/host/browser/browserHostService.js +10 -2
- package/vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js +129 -24
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.js +10 -2
- package/vscode/src/vs/workbench/services/keybinding/common/keybindingEditing.js +20 -10
- package/vscode/src/vs/workbench/services/language/common/languageService.js +122 -22
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +28 -9
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +6 -1
- package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +48 -9
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +5 -1
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModelManager.js +7 -1
- package/vscode/src/vs/workbench/services/textfile/common/textFileSaveParticipant.js +6 -1
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +81 -16
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +1 -50
- package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +126 -25
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +6 -5
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +6 -14
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +6 -1
package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js
CHANGED
|
@@ -21,11 +21,34 @@ let FilesConfigurationService = class FilesConfigurationService extends Disposab
|
|
|
21
21
|
static { FilesConfigurationService_1 = this; }
|
|
22
22
|
static { this.DEFAULT_AUTO_SAVE_MODE = isWeb ? AutoSaveConfiguration.AFTER_DELAY : AutoSaveConfiguration.OFF; }
|
|
23
23
|
static { this.READONLY_MESSAGES = {
|
|
24
|
-
providerReadonly: { value: localizeWithPath(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
providerReadonly: { value: ( localizeWithPath(
|
|
25
|
+
'vs/workbench/services/filesConfiguration/common/filesConfigurationService',
|
|
26
|
+
'providerReadonly',
|
|
27
|
+
"Editor is read-only because the file system of the file is read-only."
|
|
28
|
+
)), isTrusted: true },
|
|
29
|
+
sessionReadonly: { value: ( localizeWithPath(
|
|
30
|
+
'vs/workbench/services/filesConfiguration/common/filesConfigurationService',
|
|
31
|
+
{ key: 'sessionReadonly', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] },
|
|
32
|
+
"Editor is read-only because the file was set read-only in this session. [Click here](command:{0}) to set writeable.",
|
|
33
|
+
'workbench.action.files.setActiveEditorWriteableInSession'
|
|
34
|
+
)), isTrusted: true },
|
|
35
|
+
configuredReadonly: { value: ( localizeWithPath(
|
|
36
|
+
'vs/workbench/services/filesConfiguration/common/filesConfigurationService',
|
|
37
|
+
{ key: 'configuredReadonly', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] },
|
|
38
|
+
"Editor is read-only because the file was set read-only via settings. [Click here](command:{0}) to configure.",
|
|
39
|
+
`workbench.action.openSettings?${encodeURIComponent('["files.readonly"]')}`
|
|
40
|
+
)), isTrusted: true },
|
|
41
|
+
fileLocked: { value: ( localizeWithPath(
|
|
42
|
+
'vs/workbench/services/filesConfiguration/common/filesConfigurationService',
|
|
43
|
+
{ key: 'fileLocked', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] },
|
|
44
|
+
"Editor is read-only because of file permissions. [Click here](command:{0}) to set writeable anyway.",
|
|
45
|
+
'workbench.action.files.setActiveEditorWriteableInSession'
|
|
46
|
+
)), isTrusted: true },
|
|
47
|
+
fileReadonly: { value: ( localizeWithPath(
|
|
48
|
+
'vs/workbench/services/filesConfiguration/common/filesConfigurationService',
|
|
49
|
+
'fileReadonly',
|
|
50
|
+
"Editor is read-only because the file is read-only."
|
|
51
|
+
)), isTrusted: true }
|
|
29
52
|
}; }
|
|
30
53
|
constructor(contextKeyService, configurationService, contextService, environmentService, uriIdentityService, fileService) {
|
|
31
54
|
super();
|
|
@@ -282,8 +282,16 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
282
282
|
if (!opened) {
|
|
283
283
|
const { confirmed } = await this.dialogService.confirm({
|
|
284
284
|
type: Severity.Warning,
|
|
285
|
-
message: localizeWithPath(
|
|
286
|
-
|
|
285
|
+
message: ( localizeWithPath(
|
|
286
|
+
'vs/workbench/services/host/browser/browserHostService',
|
|
287
|
+
'unableToOpenExternal',
|
|
288
|
+
"The browser interrupted the opening of a new tab or window. Press 'Open' to open it anyway."
|
|
289
|
+
)),
|
|
290
|
+
primaryButton: ( localizeWithPath(
|
|
291
|
+
'vs/workbench/services/host/browser/browserHostService',
|
|
292
|
+
{ key: 'open', comment: ['&& denotes a mnemonic'] },
|
|
293
|
+
"&&Open"
|
|
294
|
+
))
|
|
287
295
|
});
|
|
288
296
|
if (confirmed) {
|
|
289
297
|
await this.workspaceProvider.open(workspace, options);
|
|
@@ -40,31 +40,65 @@ import { IUriIdentityService } from 'monaco-editor/esm/vs/platform/uriIdentity/c
|
|
|
40
40
|
var WorkbenchKeybindingService_1;
|
|
41
41
|
function isValidContributedKeyBinding(keyBinding, rejects) {
|
|
42
42
|
if (!keyBinding) {
|
|
43
|
-
rejects.push(nls.localizeWithPath(
|
|
43
|
+
rejects.push(( nls.localizeWithPath(
|
|
44
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
45
|
+
'nonempty',
|
|
46
|
+
"expected non-empty value."
|
|
47
|
+
)));
|
|
44
48
|
return false;
|
|
45
49
|
}
|
|
46
50
|
if (typeof keyBinding.command !== 'string') {
|
|
47
|
-
rejects.push(nls.localizeWithPath(
|
|
51
|
+
rejects.push(( nls.localizeWithPath(
|
|
52
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
53
|
+
'requirestring',
|
|
54
|
+
"property `{0}` is mandatory and must be of type `string`",
|
|
55
|
+
'command'
|
|
56
|
+
)));
|
|
48
57
|
return false;
|
|
49
58
|
}
|
|
50
59
|
if (keyBinding.key && typeof keyBinding.key !== 'string') {
|
|
51
|
-
rejects.push(nls.localizeWithPath(
|
|
60
|
+
rejects.push(( nls.localizeWithPath(
|
|
61
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
62
|
+
'optstring',
|
|
63
|
+
"property `{0}` can be omitted or must be of type `string`",
|
|
64
|
+
'key'
|
|
65
|
+
)));
|
|
52
66
|
return false;
|
|
53
67
|
}
|
|
54
68
|
if (keyBinding.when && typeof keyBinding.when !== 'string') {
|
|
55
|
-
rejects.push(nls.localizeWithPath(
|
|
69
|
+
rejects.push(( nls.localizeWithPath(
|
|
70
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
71
|
+
'optstring',
|
|
72
|
+
"property `{0}` can be omitted or must be of type `string`",
|
|
73
|
+
'when'
|
|
74
|
+
)));
|
|
56
75
|
return false;
|
|
57
76
|
}
|
|
58
77
|
if (keyBinding.mac && typeof keyBinding.mac !== 'string') {
|
|
59
|
-
rejects.push(nls.localizeWithPath(
|
|
78
|
+
rejects.push(( nls.localizeWithPath(
|
|
79
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
80
|
+
'optstring',
|
|
81
|
+
"property `{0}` can be omitted or must be of type `string`",
|
|
82
|
+
'mac'
|
|
83
|
+
)));
|
|
60
84
|
return false;
|
|
61
85
|
}
|
|
62
86
|
if (keyBinding.linux && typeof keyBinding.linux !== 'string') {
|
|
63
|
-
rejects.push(nls.localizeWithPath(
|
|
87
|
+
rejects.push(( nls.localizeWithPath(
|
|
88
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
89
|
+
'optstring',
|
|
90
|
+
"property `{0}` can be omitted or must be of type `string`",
|
|
91
|
+
'linux'
|
|
92
|
+
)));
|
|
64
93
|
return false;
|
|
65
94
|
}
|
|
66
95
|
if (keyBinding.win && typeof keyBinding.win !== 'string') {
|
|
67
|
-
rejects.push(nls.localizeWithPath(
|
|
96
|
+
rejects.push(( nls.localizeWithPath(
|
|
97
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
98
|
+
'optstring',
|
|
99
|
+
"property `{0}` can be omitted or must be of type `string`",
|
|
100
|
+
'win'
|
|
101
|
+
)));
|
|
68
102
|
return false;
|
|
69
103
|
}
|
|
70
104
|
return true;
|
|
@@ -74,30 +108,58 @@ const keybindingType = {
|
|
|
74
108
|
default: { command: '', key: '' },
|
|
75
109
|
properties: {
|
|
76
110
|
command: {
|
|
77
|
-
description: nls.localizeWithPath(
|
|
111
|
+
description: ( nls.localizeWithPath(
|
|
112
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
113
|
+
'vscode.extension.contributes.keybindings.command',
|
|
114
|
+
'Identifier of the command to run when keybinding is triggered.'
|
|
115
|
+
)),
|
|
78
116
|
type: 'string'
|
|
79
117
|
},
|
|
80
118
|
args: {
|
|
81
|
-
description: nls.localizeWithPath(
|
|
119
|
+
description: ( nls.localizeWithPath(
|
|
120
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
121
|
+
'vscode.extension.contributes.keybindings.args',
|
|
122
|
+
"Arguments to pass to the command to execute."
|
|
123
|
+
))
|
|
82
124
|
},
|
|
83
125
|
key: {
|
|
84
|
-
description: nls.localizeWithPath(
|
|
126
|
+
description: ( nls.localizeWithPath(
|
|
127
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
128
|
+
'vscode.extension.contributes.keybindings.key',
|
|
129
|
+
'Key or key sequence (separate keys with plus-sign and sequences with space, e.g. Ctrl+O and Ctrl+L L for a chord).'
|
|
130
|
+
)),
|
|
85
131
|
type: 'string'
|
|
86
132
|
},
|
|
87
133
|
mac: {
|
|
88
|
-
description: nls.localizeWithPath(
|
|
134
|
+
description: ( nls.localizeWithPath(
|
|
135
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
136
|
+
'vscode.extension.contributes.keybindings.mac',
|
|
137
|
+
'Mac specific key or key sequence.'
|
|
138
|
+
)),
|
|
89
139
|
type: 'string'
|
|
90
140
|
},
|
|
91
141
|
linux: {
|
|
92
|
-
description: nls.localizeWithPath(
|
|
142
|
+
description: ( nls.localizeWithPath(
|
|
143
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
144
|
+
'vscode.extension.contributes.keybindings.linux',
|
|
145
|
+
'Linux specific key or key sequence.'
|
|
146
|
+
)),
|
|
93
147
|
type: 'string'
|
|
94
148
|
},
|
|
95
149
|
win: {
|
|
96
|
-
description: nls.localizeWithPath(
|
|
150
|
+
description: ( nls.localizeWithPath(
|
|
151
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
152
|
+
'vscode.extension.contributes.keybindings.win',
|
|
153
|
+
'Windows specific key or key sequence.'
|
|
154
|
+
)),
|
|
97
155
|
type: 'string'
|
|
98
156
|
},
|
|
99
157
|
when: {
|
|
100
|
-
description: nls.localizeWithPath(
|
|
158
|
+
description: ( nls.localizeWithPath(
|
|
159
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
160
|
+
'vscode.extension.contributes.keybindings.when',
|
|
161
|
+
'Condition when the key is active.'
|
|
162
|
+
)),
|
|
101
163
|
type: 'string'
|
|
102
164
|
},
|
|
103
165
|
}
|
|
@@ -106,7 +168,11 @@ const keybindingsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
106
168
|
extensionPoint: 'keybindings',
|
|
107
169
|
deps: [commandsExtensionPoint],
|
|
108
170
|
jsonSchema: {
|
|
109
|
-
description: nls.localizeWithPath(
|
|
171
|
+
description: ( nls.localizeWithPath(
|
|
172
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
173
|
+
'vscode.extension.contributes.keybindings',
|
|
174
|
+
"Contributes keybindings."
|
|
175
|
+
)),
|
|
110
176
|
oneOf: [
|
|
111
177
|
keybindingType,
|
|
112
178
|
{
|
|
@@ -459,7 +525,13 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
459
525
|
}
|
|
460
526
|
}
|
|
461
527
|
if (rejects.length > 0) {
|
|
462
|
-
collector.error(nls.localizeWithPath(
|
|
528
|
+
collector.error(( nls.localizeWithPath(
|
|
529
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
530
|
+
'invalid.keybindings',
|
|
531
|
+
"Invalid `contributes.{0}`: {1}",
|
|
532
|
+
keybindingsExtPoint.name,
|
|
533
|
+
rejects.join('\n')
|
|
534
|
+
)));
|
|
463
535
|
}
|
|
464
536
|
}
|
|
465
537
|
static bindToCurrentPlatform(key, mac, linux, win) {
|
|
@@ -543,7 +615,11 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
543
615
|
static _getAllCommandsAsComment(boundCommands) {
|
|
544
616
|
const unboundCommands = getAllUnboundCommands(boundCommands);
|
|
545
617
|
const pretty = unboundCommands.sort().join('\n// - ');
|
|
546
|
-
return '// ' + nls.localizeWithPath(
|
|
618
|
+
return '// ' + ( nls.localizeWithPath(
|
|
619
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
620
|
+
'unboundCommands',
|
|
621
|
+
"Here are other available commands: "
|
|
622
|
+
)) + '\n// - ' + pretty;
|
|
547
623
|
}
|
|
548
624
|
mightProducePrintableCharacter(event) {
|
|
549
625
|
if (event.ctrlKey || event.metaKey || event.altKey) {
|
|
@@ -668,7 +744,11 @@ class KeybindingsJsonSchema {
|
|
|
668
744
|
this.schema = {
|
|
669
745
|
id: KeybindingsJsonSchema.schemaId,
|
|
670
746
|
type: 'array',
|
|
671
|
-
title: nls.localizeWithPath(
|
|
747
|
+
title: ( nls.localizeWithPath(
|
|
748
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
749
|
+
'keybindings.json.title',
|
|
750
|
+
"Keybindings configuration"
|
|
751
|
+
)),
|
|
672
752
|
allowTrailingCommas: true,
|
|
673
753
|
allowComments: true,
|
|
674
754
|
definitions: {
|
|
@@ -692,7 +772,11 @@ class KeybindingsJsonSchema {
|
|
|
692
772
|
'type': 'string',
|
|
693
773
|
'enum': this.commandsEnum,
|
|
694
774
|
'enumDescriptions': this.commandsEnumDescriptions,
|
|
695
|
-
'description': nls.localizeWithPath(
|
|
775
|
+
'description': ( nls.localizeWithPath(
|
|
776
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
777
|
+
'keybindings.json.command',
|
|
778
|
+
"Name of the command to execute"
|
|
779
|
+
)),
|
|
696
780
|
},
|
|
697
781
|
'commandType': {
|
|
698
782
|
'anyOf': [
|
|
@@ -703,7 +787,11 @@ class KeybindingsJsonSchema {
|
|
|
703
787
|
'type': 'string',
|
|
704
788
|
'enum': this.removalCommandsEnum,
|
|
705
789
|
'enumDescriptions': this.commandsEnumDescriptions,
|
|
706
|
-
'description': nls.localizeWithPath(
|
|
790
|
+
'description': ( nls.localizeWithPath(
|
|
791
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
792
|
+
'keybindings.json.removalCommand',
|
|
793
|
+
"Name of the command to remove keyboard shortcut for"
|
|
794
|
+
)),
|
|
707
795
|
},
|
|
708
796
|
{
|
|
709
797
|
'type': 'string'
|
|
@@ -721,7 +809,11 @@ class KeybindingsJsonSchema {
|
|
|
721
809
|
'properties': {
|
|
722
810
|
'key': {
|
|
723
811
|
'type': 'string',
|
|
724
|
-
'description': nls.localizeWithPath(
|
|
812
|
+
'description': ( nls.localizeWithPath(
|
|
813
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
814
|
+
'keybindings.json.key',
|
|
815
|
+
"Key or key sequence (separated by space)"
|
|
816
|
+
)),
|
|
725
817
|
},
|
|
726
818
|
'command': {
|
|
727
819
|
'anyOf': [
|
|
@@ -733,7 +825,12 @@ class KeybindingsJsonSchema {
|
|
|
733
825
|
'not': {
|
|
734
826
|
'type': 'array'
|
|
735
827
|
},
|
|
736
|
-
'errorMessage': nls.localizeWithPath(
|
|
828
|
+
'errorMessage': ( nls.localizeWithPath(
|
|
829
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
830
|
+
'keybindings.commandsIsArray',
|
|
831
|
+
"Incorrect type. Expected \"{0}\". The field 'command' does not support running multiple commands. Use command 'runCommands' to pass it multiple commands to run.",
|
|
832
|
+
'string'
|
|
833
|
+
))
|
|
737
834
|
},
|
|
738
835
|
'else': {
|
|
739
836
|
'$ref': '#/definitions/commandType'
|
|
@@ -746,10 +843,18 @@ class KeybindingsJsonSchema {
|
|
|
746
843
|
},
|
|
747
844
|
'when': {
|
|
748
845
|
'type': 'string',
|
|
749
|
-
'description': nls.localizeWithPath(
|
|
846
|
+
'description': ( nls.localizeWithPath(
|
|
847
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
848
|
+
'keybindings.json.when',
|
|
849
|
+
"Condition when the key is active."
|
|
850
|
+
))
|
|
750
851
|
},
|
|
751
852
|
'args': {
|
|
752
|
-
'description': nls.localizeWithPath(
|
|
853
|
+
'description': ( nls.localizeWithPath(
|
|
854
|
+
'vs/workbench/services/keybinding/browser/keybindingService',
|
|
855
|
+
'keybindings.json.args',
|
|
856
|
+
"Arguments to pass to the command to execute."
|
|
857
|
+
))
|
|
753
858
|
}
|
|
754
859
|
},
|
|
755
860
|
'$ref': '#/definitions/commandsSchemas'
|
|
@@ -477,12 +477,20 @@ const keyboardConfiguration = {
|
|
|
477
477
|
'id': 'keyboard',
|
|
478
478
|
'order': 15,
|
|
479
479
|
'type': 'object',
|
|
480
|
-
'title': nls.localizeWithPath(
|
|
480
|
+
'title': ( nls.localizeWithPath(
|
|
481
|
+
'vs/workbench/services/keybinding/browser/keyboardLayoutService',
|
|
482
|
+
'keyboardConfigurationTitle',
|
|
483
|
+
"Keyboard"
|
|
484
|
+
)),
|
|
481
485
|
'properties': {
|
|
482
486
|
'keyboard.layout': {
|
|
483
487
|
'type': 'string',
|
|
484
488
|
'default': 'autodetect',
|
|
485
|
-
'description': nls.localizeWithPath(
|
|
489
|
+
'description': ( nls.localizeWithPath(
|
|
490
|
+
'vs/workbench/services/keybinding/browser/keyboardLayoutService',
|
|
491
|
+
'keyboard.layout.config',
|
|
492
|
+
"Control the keyboard layout used in web."
|
|
493
|
+
))
|
|
486
494
|
}
|
|
487
495
|
}
|
|
488
496
|
};
|
|
@@ -214,9 +214,11 @@ let KeybindingsEditingService = class KeybindingsEditingService extends Disposab
|
|
|
214
214
|
}
|
|
215
215
|
resolveAndValidate() {
|
|
216
216
|
if (this.textFileService.isDirty(this.userDataProfileService.currentProfile.keybindingsResource)) {
|
|
217
|
-
return Promise.reject(( new Error(
|
|
218
|
-
|
|
219
|
-
|
|
217
|
+
return Promise.reject(( new Error(( localizeWithPath(
|
|
218
|
+
'vs/workbench/services/keybinding/common/keybindingEditing',
|
|
219
|
+
'errorKeybindingsFileDirty',
|
|
220
|
+
"Unable to write because the keybindings configuration file has unsaved changes. Please save it first and then try again."
|
|
221
|
+
)))));
|
|
220
222
|
}
|
|
221
223
|
return this.resolveModelReference()
|
|
222
224
|
.then(reference => {
|
|
@@ -226,16 +228,20 @@ let KeybindingsEditingService = class KeybindingsEditingService extends Disposab
|
|
|
226
228
|
const parsed = this.parse(model);
|
|
227
229
|
if (parsed.parseErrors.length) {
|
|
228
230
|
reference.dispose();
|
|
229
|
-
return Promise.reject(( new Error(
|
|
230
|
-
|
|
231
|
-
|
|
231
|
+
return Promise.reject(( new Error(( localizeWithPath(
|
|
232
|
+
'vs/workbench/services/keybinding/common/keybindingEditing',
|
|
233
|
+
'parseErrors',
|
|
234
|
+
"Unable to write to the keybindings configuration file. Please open it to correct errors/warnings in the file and try again."
|
|
235
|
+
)))));
|
|
232
236
|
}
|
|
233
237
|
if (parsed.result) {
|
|
234
238
|
if (!Array.isArray(parsed.result)) {
|
|
235
239
|
reference.dispose();
|
|
236
|
-
return Promise.reject(( new Error(
|
|
237
|
-
|
|
238
|
-
|
|
240
|
+
return Promise.reject(( new Error(( localizeWithPath(
|
|
241
|
+
'vs/workbench/services/keybinding/common/keybindingEditing',
|
|
242
|
+
'errorInvalidConfiguration',
|
|
243
|
+
"Unable to write to the keybindings configuration file. It has an object which is not of type Array. Please open the file to clean up and try again."
|
|
244
|
+
)))));
|
|
239
245
|
}
|
|
240
246
|
}
|
|
241
247
|
else {
|
|
@@ -256,7 +262,11 @@ let KeybindingsEditingService = class KeybindingsEditingService extends Disposab
|
|
|
256
262
|
return { result, parseErrors };
|
|
257
263
|
}
|
|
258
264
|
getEmptyContent(EOL) {
|
|
259
|
-
return '// ' + localizeWithPath(
|
|
265
|
+
return '// ' + ( localizeWithPath(
|
|
266
|
+
'vs/workbench/services/keybinding/common/keybindingEditing',
|
|
267
|
+
'emptyKeybindingsHeader',
|
|
268
|
+
"Place your key bindings in this file to override the defaults"
|
|
269
|
+
)) + EOL + '[]';
|
|
260
270
|
}
|
|
261
271
|
};
|
|
262
272
|
KeybindingsEditingService = ( __decorate([
|