@codingame/monaco-vscode-api 1.83.2 → 1.83.3
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/extensions.d.ts +3 -3
- package/extensions.js +31 -33
- package/l10n.d.ts +4 -0
- package/l10n.js +10 -0
- package/missing-services.js +4 -2
- package/monaco-editor-treemending.patch +11880 -682
- package/monaco-treemending.js +8 -2
- package/package.json +8 -1
- package/service-override/extensions.js +2 -2
- package/service-override/layout.js +2 -2
- package/tools/l10n.js +177 -0
- package/tools.js +22 -1
- package/vscode/src/vs/base/browser/ui/menu/menubar.js +1 -1
- package/vscode/src/vs/base/browser/ui/splitview/paneview.js +2 -2
- package/vscode/src/vs/base/common/date.js +55 -55
- package/vscode/src/vs/base/common/jsonErrorMessages.js +10 -10
- package/vscode/src/vs/base/common/tfIdf.js +137 -0
- package/vscode/src/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js +23 -0
- package/vscode/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +115 -0
- package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +112 -0
- package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +334 -0
- package/vscode/src/vs/platform/dialogs/common/dialogs.js +10 -14
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +3 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +2 -2
- package/vscode/src/vs/platform/files/common/fileService.js +28 -37
- package/vscode/src/vs/platform/files/common/files.js +6 -6
- package/vscode/src/vs/platform/files/common/io.js +2 -2
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardConfig.js +3 -9
- package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.js +300 -0
- package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.js +59 -0
- package/vscode/src/vs/platform/quickinput/browser/pickerQuickAccess.js +212 -0
- package/vscode/src/vs/platform/request/common/request.js +2 -2
- package/vscode/src/vs/platform/theme/common/tokenClassificationRegistry.js +42 -63
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +13 -32
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +4 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +38 -50
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +21 -53
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +4 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +6 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +15 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +2 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +6 -28
- package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +60 -0
- package/vscode/src/vs/workbench/api/common/extHostChat.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +2 -6
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +3 -11
- package/vscode/src/vs/workbench/api/common/extHostLogService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostProgress.js +2 -6
- package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +3 -7
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +2 -6
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +2 -6
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +2 -7
- package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +9 -34
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +898 -68
- package/vscode/src/vs/workbench/browser/actions/quickAccessActions.js +7 -7
- package/vscode/src/vs/workbench/browser/actions/windowActions.js +32 -38
- package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +103 -13
- package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +2 -2
- package/vscode/src/vs/workbench/browser/editor.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +12 -27
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +12 -12
- package/vscode/src/vs/workbench/browser/parts/editor/binaryDiffEditor.js +2 -7
- package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +4 -7
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.js +42 -90
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +140 -272
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +115 -148
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +21 -33
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +7 -19
- package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +10 -26
- package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +7 -17
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +60 -81
- package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +4 -11
- package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +8 -8
- package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +69 -34
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +58 -34
- package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +3 -9
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +6 -6
- package/vscode/src/vs/workbench/browser/parts/views/viewsService.js +7 -11
- package/vscode/src/vs/workbench/browser/quickaccess.js +7 -3
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +186 -683
- package/vscode/src/vs/workbench/common/configuration.js +12 -15
- package/vscode/src/vs/workbench/common/contextkeys.js +272 -90
- package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +2 -2
- package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +2 -7
- package/vscode/src/vs/workbench/common/editor/textEditorModel.js +2 -6
- package/vscode/src/vs/workbench/common/editor.js +5 -5
- package/vscode/src/vs/workbench/common/theme.js +137 -527
- package/vscode/src/vs/workbench/common/views.js +4 -8
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +15 -55
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +3 -8
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +22 -60
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +9 -15
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +18 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +5 -10
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +5 -13
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +8 -27
- package/vscode/src/vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint.js +5 -17
- package/vscode/src/vs/workbench/contrib/codeActions/common/documentationExtensionPoint.js +6 -15
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +7 -20
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +63 -216
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +4 -7
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +5 -8
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +8 -11
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +5 -15
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +3 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +3 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +10 -9
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +6 -15
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +5 -20
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +3 -10
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +4 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +3 -20
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +9 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +4 -13
- package/vscode/src/vs/workbench/contrib/comments/browser/comments.contribution.js +26 -77
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +5 -17
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +7 -12
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +10 -29
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +8 -8
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +25 -21
- package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +1 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +13 -13
- package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +56 -98
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +96 -180
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +25 -79
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +4 -15
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +4 -8
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +56 -19
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +76 -230
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -5
- package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +33 -103
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution.js +228 -99
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +5 -9
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +5 -5
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +15 -35
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +5 -8
- package/vscode/src/vs/workbench/contrib/files/common/files.js +27 -48
- package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -6
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +5 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +112 -52
- package/vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +30 -96
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +42 -0
- package/vscode/src/vs/workbench/contrib/output/browser/output.contribution.js +23 -29
- package/vscode/src/vs/workbench/contrib/output/browser/outputView.js +3 -3
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +13 -16
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +15 -34
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +12 -17
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtyDiffSwitcher.js +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +26 -75
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +4 -19
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +4 -4
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +10 -41
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -14
- package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +26 -13
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +8 -6
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +5 -17
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +7 -28
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +21 -78
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +21 -53
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +2 -2
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +2 -5
- package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +113 -348
- package/vscode/src/vs/workbench/services/assignment/common/assignmentService.js +2 -5
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +31 -1
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +1 -4
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
- package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +2 -2
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +2 -5
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +4 -4
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +10 -45
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +80 -296
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +6 -21
- package/vscode/src/vs/workbench/services/host/browser/browserHostService.js +3 -6
- package/vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js +24 -81
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.js +2 -2
- package/vscode/src/vs/workbench/services/keybinding/common/keybindingEditing.js +11 -17
- package/vscode/src/vs/workbench/services/language/common/languageService.js +23 -98
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +9 -11
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -5
- package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +11 -23
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +2 -2
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModelManager.js +2 -7
- package/vscode/src/vs/workbench/services/textfile/common/textFileSaveParticipant.js +2 -2
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +16 -53
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +50 -1
- package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +25 -99
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +6 -3
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +15 -3
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +2 -2
package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
3
|
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
4
4
|
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
5
5
|
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
@@ -21,26 +21,11 @@ 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: (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)), isTrusted: true },
|
|
28
|
-
|
|
29
|
-
{ key: 'sessionReadonly', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] },
|
|
30
|
-
"Editor is read-only because the file was set read-only in this session. [Click here](command:{0}) to set writeable.",
|
|
31
|
-
'workbench.action.files.setActiveEditorWriteableInSession'
|
|
32
|
-
)), isTrusted: true },
|
|
33
|
-
configuredReadonly: { value: ( localize(
|
|
34
|
-
{ key: 'configuredReadonly', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] },
|
|
35
|
-
"Editor is read-only because the file was set read-only via settings. [Click here](command:{0}) to configure.",
|
|
36
|
-
`workbench.action.openSettings?${encodeURIComponent('["files.readonly"]')}`
|
|
37
|
-
)), isTrusted: true },
|
|
38
|
-
fileLocked: { value: ( localize(
|
|
39
|
-
{ key: 'fileLocked', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] },
|
|
40
|
-
"Editor is read-only because of file permissions. [Click here](command:{0}) to set writeable anyway.",
|
|
41
|
-
'workbench.action.files.setActiveEditorWriteableInSession'
|
|
42
|
-
)), isTrusted: true },
|
|
43
|
-
fileReadonly: { value: ( localize('fileReadonly', "Editor is read-only because the file is read-only.")), isTrusted: true }
|
|
24
|
+
providerReadonly: { value: localizeWithPath('vs/workbench/services/filesConfiguration/common/filesConfigurationService', 'providerReadonly', "Editor is read-only because the file system of the file is read-only."), isTrusted: true },
|
|
25
|
+
sessionReadonly: { value: localizeWithPath('vs/workbench/services/filesConfiguration/common/filesConfigurationService', { key: 'sessionReadonly', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] }, "Editor is read-only because the file was set read-only in this session. [Click here](command:{0}) to set writeable.", 'workbench.action.files.setActiveEditorWriteableInSession'), isTrusted: true },
|
|
26
|
+
configuredReadonly: { value: localizeWithPath('vs/workbench/services/filesConfiguration/common/filesConfigurationService', { key: 'configuredReadonly', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] }, "Editor is read-only because the file was set read-only via settings. [Click here](command:{0}) to configure.", `workbench.action.openSettings?${encodeURIComponent('["files.readonly"]')}`), isTrusted: true },
|
|
27
|
+
fileLocked: { value: localizeWithPath('vs/workbench/services/filesConfiguration/common/filesConfigurationService', { key: 'fileLocked', comment: ['Please do not translate the word "command", it is part of our internal syntax which must not change', '{Locked="](command:{0})"}'] }, "Editor is read-only because of file permissions. [Click here](command:{0}) to set writeable anyway.", 'workbench.action.files.setActiveEditorWriteableInSession'), isTrusted: true },
|
|
28
|
+
fileReadonly: { value: localizeWithPath('vs/workbench/services/filesConfiguration/common/filesConfigurationService', 'fileReadonly', "Editor is read-only because the file is read-only."), isTrusted: true }
|
|
44
29
|
}; }
|
|
45
30
|
constructor(contextKeyService, configurationService, contextService, environmentService, uriIdentityService, fileService) {
|
|
46
31
|
super();
|
|
@@ -18,7 +18,7 @@ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiati
|
|
|
18
18
|
import { ILifecycleService } from '../../lifecycle/common/lifecycle.js';
|
|
19
19
|
import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
20
20
|
import { getWorkspaceIdentifier } from '../../workspaces/browser/workspaces.js';
|
|
21
|
-
import {
|
|
21
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
22
22
|
import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
|
|
23
23
|
import '../../../../../../../override/vs/platform/dialogs/common/dialogs.js';
|
|
24
24
|
import { DomEmitter } from 'monaco-editor/esm/vs/base/browser/event.js';
|
|
@@ -282,11 +282,8 @@ 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: (
|
|
286
|
-
|
|
287
|
-
"The browser interrupted the opening of a new tab or window. Press 'Open' to open it anyway."
|
|
288
|
-
)),
|
|
289
|
-
primaryButton: ( localize({ key: 'open', comment: ['&& denotes a mnemonic'] }, "&&Open"))
|
|
285
|
+
message: localizeWithPath('vs/workbench/services/host/browser/browserHostService', 'unableToOpenExternal', "The browser interrupted the opening of a new tab or window. Press 'Open' to open it anyway."),
|
|
286
|
+
primaryButton: localizeWithPath('vs/workbench/services/host/browser/browserHostService', { key: 'open', comment: ['&& denotes a mnemonic'] }, "&&Open")
|
|
290
287
|
});
|
|
291
288
|
if (confirmed) {
|
|
292
289
|
await this.workspaceProvider.open(workspace, options);
|
|
@@ -40,55 +40,31 @@ 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(
|
|
43
|
+
rejects.push(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'nonempty', "expected non-empty value."));
|
|
44
44
|
return false;
|
|
45
45
|
}
|
|
46
46
|
if (typeof keyBinding.command !== 'string') {
|
|
47
|
-
rejects.push(
|
|
48
|
-
'requirestring',
|
|
49
|
-
"property `{0}` is mandatory and must be of type `string`",
|
|
50
|
-
'command'
|
|
51
|
-
)));
|
|
47
|
+
rejects.push(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'requirestring', "property `{0}` is mandatory and must be of type `string`", 'command'));
|
|
52
48
|
return false;
|
|
53
49
|
}
|
|
54
50
|
if (keyBinding.key && typeof keyBinding.key !== 'string') {
|
|
55
|
-
rejects.push(
|
|
56
|
-
'optstring',
|
|
57
|
-
"property `{0}` can be omitted or must be of type `string`",
|
|
58
|
-
'key'
|
|
59
|
-
)));
|
|
51
|
+
rejects.push(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'optstring', "property `{0}` can be omitted or must be of type `string`", 'key'));
|
|
60
52
|
return false;
|
|
61
53
|
}
|
|
62
54
|
if (keyBinding.when && typeof keyBinding.when !== 'string') {
|
|
63
|
-
rejects.push(
|
|
64
|
-
'optstring',
|
|
65
|
-
"property `{0}` can be omitted or must be of type `string`",
|
|
66
|
-
'when'
|
|
67
|
-
)));
|
|
55
|
+
rejects.push(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'optstring', "property `{0}` can be omitted or must be of type `string`", 'when'));
|
|
68
56
|
return false;
|
|
69
57
|
}
|
|
70
58
|
if (keyBinding.mac && typeof keyBinding.mac !== 'string') {
|
|
71
|
-
rejects.push(
|
|
72
|
-
'optstring',
|
|
73
|
-
"property `{0}` can be omitted or must be of type `string`",
|
|
74
|
-
'mac'
|
|
75
|
-
)));
|
|
59
|
+
rejects.push(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'optstring', "property `{0}` can be omitted or must be of type `string`", 'mac'));
|
|
76
60
|
return false;
|
|
77
61
|
}
|
|
78
62
|
if (keyBinding.linux && typeof keyBinding.linux !== 'string') {
|
|
79
|
-
rejects.push(
|
|
80
|
-
'optstring',
|
|
81
|
-
"property `{0}` can be omitted or must be of type `string`",
|
|
82
|
-
'linux'
|
|
83
|
-
)));
|
|
63
|
+
rejects.push(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'optstring', "property `{0}` can be omitted or must be of type `string`", 'linux'));
|
|
84
64
|
return false;
|
|
85
65
|
}
|
|
86
66
|
if (keyBinding.win && typeof keyBinding.win !== 'string') {
|
|
87
|
-
rejects.push(
|
|
88
|
-
'optstring',
|
|
89
|
-
"property `{0}` can be omitted or must be of type `string`",
|
|
90
|
-
'win'
|
|
91
|
-
)));
|
|
67
|
+
rejects.push(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'optstring', "property `{0}` can be omitted or must be of type `string`", 'win'));
|
|
92
68
|
return false;
|
|
93
69
|
}
|
|
94
70
|
return true;
|
|
@@ -98,51 +74,30 @@ const keybindingType = {
|
|
|
98
74
|
default: { command: '', key: '' },
|
|
99
75
|
properties: {
|
|
100
76
|
command: {
|
|
101
|
-
description: (
|
|
102
|
-
'vscode.extension.contributes.keybindings.command',
|
|
103
|
-
'Identifier of the command to run when keybinding is triggered.'
|
|
104
|
-
)),
|
|
77
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings.command', 'Identifier of the command to run when keybinding is triggered.'),
|
|
105
78
|
type: 'string'
|
|
106
79
|
},
|
|
107
80
|
args: {
|
|
108
|
-
description: (
|
|
109
|
-
'vscode.extension.contributes.keybindings.args',
|
|
110
|
-
"Arguments to pass to the command to execute."
|
|
111
|
-
))
|
|
81
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings.args', "Arguments to pass to the command to execute.")
|
|
112
82
|
},
|
|
113
83
|
key: {
|
|
114
|
-
description: (
|
|
115
|
-
'vscode.extension.contributes.keybindings.key',
|
|
116
|
-
'Key or key sequence (separate keys with plus-sign and sequences with space, e.g. Ctrl+O and Ctrl+L L for a chord).'
|
|
117
|
-
)),
|
|
84
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings.key', 'Key or key sequence (separate keys with plus-sign and sequences with space, e.g. Ctrl+O and Ctrl+L L for a chord).'),
|
|
118
85
|
type: 'string'
|
|
119
86
|
},
|
|
120
87
|
mac: {
|
|
121
|
-
description: (
|
|
122
|
-
'vscode.extension.contributes.keybindings.mac',
|
|
123
|
-
'Mac specific key or key sequence.'
|
|
124
|
-
)),
|
|
88
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings.mac', 'Mac specific key or key sequence.'),
|
|
125
89
|
type: 'string'
|
|
126
90
|
},
|
|
127
91
|
linux: {
|
|
128
|
-
description: (
|
|
129
|
-
'vscode.extension.contributes.keybindings.linux',
|
|
130
|
-
'Linux specific key or key sequence.'
|
|
131
|
-
)),
|
|
92
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings.linux', 'Linux specific key or key sequence.'),
|
|
132
93
|
type: 'string'
|
|
133
94
|
},
|
|
134
95
|
win: {
|
|
135
|
-
description: (
|
|
136
|
-
'vscode.extension.contributes.keybindings.win',
|
|
137
|
-
'Windows specific key or key sequence.'
|
|
138
|
-
)),
|
|
96
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings.win', 'Windows specific key or key sequence.'),
|
|
139
97
|
type: 'string'
|
|
140
98
|
},
|
|
141
99
|
when: {
|
|
142
|
-
description: (
|
|
143
|
-
'vscode.extension.contributes.keybindings.when',
|
|
144
|
-
'Condition when the key is active.'
|
|
145
|
-
)),
|
|
100
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings.when', 'Condition when the key is active.'),
|
|
146
101
|
type: 'string'
|
|
147
102
|
},
|
|
148
103
|
}
|
|
@@ -151,7 +106,7 @@ const keybindingsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
151
106
|
extensionPoint: 'keybindings',
|
|
152
107
|
deps: [commandsExtensionPoint],
|
|
153
108
|
jsonSchema: {
|
|
154
|
-
description:
|
|
109
|
+
description: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'vscode.extension.contributes.keybindings', "Contributes keybindings."),
|
|
155
110
|
oneOf: [
|
|
156
111
|
keybindingType,
|
|
157
112
|
{
|
|
@@ -504,12 +459,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
504
459
|
}
|
|
505
460
|
}
|
|
506
461
|
if (rejects.length > 0) {
|
|
507
|
-
collector.error((
|
|
508
|
-
'invalid.keybindings',
|
|
509
|
-
"Invalid `contributes.{0}`: {1}",
|
|
510
|
-
keybindingsExtPoint.name,
|
|
511
|
-
rejects.join('\n')
|
|
512
|
-
)));
|
|
462
|
+
collector.error(nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'invalid.keybindings', "Invalid `contributes.{0}`: {1}", keybindingsExtPoint.name, rejects.join('\n')));
|
|
513
463
|
}
|
|
514
464
|
}
|
|
515
465
|
static bindToCurrentPlatform(key, mac, linux, win) {
|
|
@@ -593,7 +543,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
593
543
|
static _getAllCommandsAsComment(boundCommands) {
|
|
594
544
|
const unboundCommands = getAllUnboundCommands(boundCommands);
|
|
595
545
|
const pretty = unboundCommands.sort().join('\n// - ');
|
|
596
|
-
return '// ' +
|
|
546
|
+
return '// ' + nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'unboundCommands', "Here are other available commands: ") + '\n// - ' + pretty;
|
|
597
547
|
}
|
|
598
548
|
mightProducePrintableCharacter(event) {
|
|
599
549
|
if (event.ctrlKey || event.metaKey || event.altKey) {
|
|
@@ -718,7 +668,7 @@ class KeybindingsJsonSchema {
|
|
|
718
668
|
this.schema = {
|
|
719
669
|
id: KeybindingsJsonSchema.schemaId,
|
|
720
670
|
type: 'array',
|
|
721
|
-
title:
|
|
671
|
+
title: nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'keybindings.json.title', "Keybindings configuration"),
|
|
722
672
|
allowTrailingCommas: true,
|
|
723
673
|
allowComments: true,
|
|
724
674
|
definitions: {
|
|
@@ -742,7 +692,7 @@ class KeybindingsJsonSchema {
|
|
|
742
692
|
'type': 'string',
|
|
743
693
|
'enum': this.commandsEnum,
|
|
744
694
|
'enumDescriptions': this.commandsEnumDescriptions,
|
|
745
|
-
'description':
|
|
695
|
+
'description': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'keybindings.json.command', "Name of the command to execute"),
|
|
746
696
|
},
|
|
747
697
|
'commandType': {
|
|
748
698
|
'anyOf': [
|
|
@@ -753,10 +703,7 @@ class KeybindingsJsonSchema {
|
|
|
753
703
|
'type': 'string',
|
|
754
704
|
'enum': this.removalCommandsEnum,
|
|
755
705
|
'enumDescriptions': this.commandsEnumDescriptions,
|
|
756
|
-
'description': (
|
|
757
|
-
'keybindings.json.removalCommand',
|
|
758
|
-
"Name of the command to remove keyboard shortcut for"
|
|
759
|
-
)),
|
|
706
|
+
'description': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'keybindings.json.removalCommand', "Name of the command to remove keyboard shortcut for"),
|
|
760
707
|
},
|
|
761
708
|
{
|
|
762
709
|
'type': 'string'
|
|
@@ -774,7 +721,7 @@ class KeybindingsJsonSchema {
|
|
|
774
721
|
'properties': {
|
|
775
722
|
'key': {
|
|
776
723
|
'type': 'string',
|
|
777
|
-
'description':
|
|
724
|
+
'description': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'keybindings.json.key', "Key or key sequence (separated by space)"),
|
|
778
725
|
},
|
|
779
726
|
'command': {
|
|
780
727
|
'anyOf': [
|
|
@@ -786,11 +733,7 @@ class KeybindingsJsonSchema {
|
|
|
786
733
|
'not': {
|
|
787
734
|
'type': 'array'
|
|
788
735
|
},
|
|
789
|
-
'errorMessage': (
|
|
790
|
-
'keybindings.commandsIsArray',
|
|
791
|
-
"Incorrect type. Expected \"{0}\". The field 'command' does not support running multiple commands. Use command 'runCommands' to pass it multiple commands to run.",
|
|
792
|
-
'string'
|
|
793
|
-
))
|
|
736
|
+
'errorMessage': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'keybindings.commandsIsArray', "Incorrect type. Expected \"{0}\". The field 'command' does not support running multiple commands. Use command 'runCommands' to pass it multiple commands to run.", 'string')
|
|
794
737
|
},
|
|
795
738
|
'else': {
|
|
796
739
|
'$ref': '#/definitions/commandType'
|
|
@@ -803,10 +746,10 @@ class KeybindingsJsonSchema {
|
|
|
803
746
|
},
|
|
804
747
|
'when': {
|
|
805
748
|
'type': 'string',
|
|
806
|
-
'description':
|
|
749
|
+
'description': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'keybindings.json.when', "Condition when the key is active.")
|
|
807
750
|
},
|
|
808
751
|
'args': {
|
|
809
|
-
'description':
|
|
752
|
+
'description': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keybindingService', 'keybindings.json.args', "Arguments to pass to the command to execute.")
|
|
810
753
|
}
|
|
811
754
|
},
|
|
812
755
|
'$ref': '#/definitions/commandsSchemas'
|
|
@@ -477,12 +477,12 @@ const keyboardConfiguration = {
|
|
|
477
477
|
'id': 'keyboard',
|
|
478
478
|
'order': 15,
|
|
479
479
|
'type': 'object',
|
|
480
|
-
'title':
|
|
480
|
+
'title': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keyboardLayoutService', 'keyboardConfigurationTitle', "Keyboard"),
|
|
481
481
|
'properties': {
|
|
482
482
|
'keyboard.layout': {
|
|
483
483
|
'type': 'string',
|
|
484
484
|
'default': 'autodetect',
|
|
485
|
-
'description':
|
|
485
|
+
'description': nls.localizeWithPath('vs/workbench/services/keybinding/browser/keyboardLayoutService', 'keyboard.layout.config', "Control the keyboard layout used in web.")
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
3
|
import { Queue } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
4
4
|
import * as json from 'monaco-editor/esm/vs/base/common/json.js';
|
|
5
5
|
import * as objects from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
@@ -214,10 +214,9 @@ 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
|
-
'errorKeybindingsFileDirty',
|
|
219
|
-
|
|
220
|
-
)))));
|
|
217
|
+
return Promise.reject(( new Error(
|
|
218
|
+
localizeWithPath('vs/workbench/services/keybinding/common/keybindingEditing', 'errorKeybindingsFileDirty', "Unable to write because the keybindings configuration file has unsaved changes. Please save it first and then try again.")
|
|
219
|
+
)));
|
|
221
220
|
}
|
|
222
221
|
return this.resolveModelReference()
|
|
223
222
|
.then(reference => {
|
|
@@ -227,18 +226,16 @@ let KeybindingsEditingService = class KeybindingsEditingService extends Disposab
|
|
|
227
226
|
const parsed = this.parse(model);
|
|
228
227
|
if (parsed.parseErrors.length) {
|
|
229
228
|
reference.dispose();
|
|
230
|
-
return Promise.reject(( new Error(
|
|
231
|
-
'parseErrors',
|
|
232
|
-
|
|
233
|
-
)))));
|
|
229
|
+
return Promise.reject(( new Error(
|
|
230
|
+
localizeWithPath('vs/workbench/services/keybinding/common/keybindingEditing', 'parseErrors', "Unable to write to the keybindings configuration file. Please open it to correct errors/warnings in the file and try again.")
|
|
231
|
+
)));
|
|
234
232
|
}
|
|
235
233
|
if (parsed.result) {
|
|
236
234
|
if (!Array.isArray(parsed.result)) {
|
|
237
235
|
reference.dispose();
|
|
238
|
-
return Promise.reject(( new Error(
|
|
239
|
-
'errorInvalidConfiguration',
|
|
240
|
-
|
|
241
|
-
)))));
|
|
236
|
+
return Promise.reject(( new Error(
|
|
237
|
+
localizeWithPath('vs/workbench/services/keybinding/common/keybindingEditing', 'errorInvalidConfiguration', "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.")
|
|
238
|
+
)));
|
|
242
239
|
}
|
|
243
240
|
}
|
|
244
241
|
else {
|
|
@@ -259,10 +256,7 @@ let KeybindingsEditingService = class KeybindingsEditingService extends Disposab
|
|
|
259
256
|
return { result, parseErrors };
|
|
260
257
|
}
|
|
261
258
|
getEmptyContent(EOL) {
|
|
262
|
-
return '// ' + (
|
|
263
|
-
'emptyKeybindingsHeader',
|
|
264
|
-
"Place your key bindings in this file to override the defaults"
|
|
265
|
-
)) + EOL + '[]';
|
|
259
|
+
return '// ' + localizeWithPath('vs/workbench/services/keybinding/common/keybindingEditing', 'emptyKeybindingsHeader', "Place your key bindings in this file to override the defaults") + EOL + '[]';
|
|
266
260
|
}
|
|
267
261
|
};
|
|
268
262
|
KeybindingsEditingService = ( __decorate([
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
3
|
import { clearConfiguredLanguageAssociations, registerConfiguredLanguageAssociation } from 'monaco-editor/esm/vs/editor/common/services/languagesAssociations.js';
|
|
4
4
|
import { joinPath } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
5
5
|
import { LanguageService } from 'monaco-editor/esm/vs/editor/common/services/languageService.js';
|
|
@@ -12,34 +12,25 @@ import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
|
12
12
|
const languagesExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
13
13
|
extensionPoint: 'languages',
|
|
14
14
|
jsonSchema: {
|
|
15
|
-
description: (
|
|
16
|
-
'vscode.extension.contributes.languages',
|
|
17
|
-
'Contributes language declarations.'
|
|
18
|
-
)),
|
|
15
|
+
description: localizeWithPath('vs/workbench/services/language/common/languageService', 'vscode.extension.contributes.languages', 'Contributes language declarations.'),
|
|
19
16
|
type: 'array',
|
|
20
17
|
items: {
|
|
21
18
|
type: 'object',
|
|
22
19
|
defaultSnippets: [{ body: { id: '${1:languageId}', aliases: ['${2:label}'], extensions: ['${3:extension}'], configuration: './language-configuration.json' } }],
|
|
23
20
|
properties: {
|
|
24
21
|
id: {
|
|
25
|
-
description: (
|
|
22
|
+
description: localizeWithPath('vs/workbench/services/language/common/languageService', 'vscode.extension.contributes.languages.id', 'ID of the language.'),
|
|
26
23
|
type: 'string'
|
|
27
24
|
},
|
|
28
25
|
aliases: {
|
|
29
|
-
description: (
|
|
30
|
-
'vscode.extension.contributes.languages.aliases',
|
|
31
|
-
'Name aliases for the language.'
|
|
32
|
-
)),
|
|
26
|
+
description: localizeWithPath('vs/workbench/services/language/common/languageService', 'vscode.extension.contributes.languages.aliases', 'Name aliases for the language.'),
|
|
33
27
|
type: 'array',
|
|
34
28
|
items: {
|
|
35
29
|
type: 'string'
|
|
36
30
|
}
|
|
37
31
|
},
|
|
38
32
|
extensions: {
|
|
39
|
-
description: (
|
|
40
|
-
'vscode.extension.contributes.languages.extensions',
|
|
41
|
-
'File extensions associated to the language.'
|
|
42
|
-
)),
|
|
33
|
+
description: localizeWithPath('vs/workbench/services/language/common/languageService', 'vscode.extension.contributes.languages.extensions', 'File extensions associated to the language.'),
|
|
43
34
|
default: ['.foo'],
|
|
44
35
|
type: 'array',
|
|
45
36
|
items: {
|
|
@@ -47,69 +38,45 @@ const languagesExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
47
38
|
}
|
|
48
39
|
},
|
|
49
40
|
filenames: {
|
|
50
|
-
description: (
|
|
51
|
-
'vscode.extension.contributes.languages.filenames',
|
|
52
|
-
'File names associated to the language.'
|
|
53
|
-
)),
|
|
41
|
+
description: localizeWithPath('vs/workbench/services/language/common/languageService', 'vscode.extension.contributes.languages.filenames', 'File names associated to the language.'),
|
|
54
42
|
type: 'array',
|
|
55
43
|
items: {
|
|
56
44
|
type: 'string'
|
|
57
45
|
}
|
|
58
46
|
},
|
|
59
47
|
filenamePatterns: {
|
|
60
|
-
description: (
|
|
61
|
-
'vscode.extension.contributes.languages.filenamePatterns',
|
|
62
|
-
'File name glob patterns associated to the language.'
|
|
63
|
-
)),
|
|
48
|
+
description: localizeWithPath('vs/workbench/services/language/common/languageService', 'vscode.extension.contributes.languages.filenamePatterns', 'File name glob patterns associated to the language.'),
|
|
64
49
|
type: 'array',
|
|
65
50
|
items: {
|
|
66
51
|
type: 'string'
|
|
67
52
|
}
|
|
68
53
|
},
|
|
69
54
|
mimetypes: {
|
|
70
|
-
description: (
|
|
71
|
-
'vscode.extension.contributes.languages.mimetypes',
|
|
72
|
-
'Mime types associated to the language.'
|
|
73
|
-
)),
|
|
55
|
+
description: localizeWithPath('vs/workbench/services/language/common/languageService', 'vscode.extension.contributes.languages.mimetypes', 'Mime types associated to the language.'),
|
|
74
56
|
type: 'array',
|
|
75
57
|
items: {
|
|
76
58
|
type: 'string'
|
|
77
59
|
}
|
|
78
60
|
},
|
|
79
61
|
firstLine: {
|
|
80
|
-
description: (
|
|
81
|
-
'vscode.extension.contributes.languages.firstLine',
|
|
82
|
-
'A regular expression matching the first line of a file of the language.'
|
|
83
|
-
)),
|
|
62
|
+
description: localizeWithPath('vs/workbench/services/language/common/languageService', 'vscode.extension.contributes.languages.firstLine', 'A regular expression matching the first line of a file of the language.'),
|
|
84
63
|
type: 'string'
|
|
85
64
|
},
|
|
86
65
|
configuration: {
|
|
87
|
-
description: (
|
|
88
|
-
'vscode.extension.contributes.languages.configuration',
|
|
89
|
-
'A relative path to a file containing configuration options for the language.'
|
|
90
|
-
)),
|
|
66
|
+
description: localizeWithPath('vs/workbench/services/language/common/languageService', 'vscode.extension.contributes.languages.configuration', 'A relative path to a file containing configuration options for the language.'),
|
|
91
67
|
type: 'string',
|
|
92
68
|
default: './language-configuration.json'
|
|
93
69
|
},
|
|
94
70
|
icon: {
|
|
95
71
|
type: 'object',
|
|
96
|
-
description: (
|
|
97
|
-
'vscode.extension.contributes.languages.icon',
|
|
98
|
-
'A icon to use as file icon, if no icon theme provides one for the language.'
|
|
99
|
-
)),
|
|
72
|
+
description: localizeWithPath('vs/workbench/services/language/common/languageService', 'vscode.extension.contributes.languages.icon', 'A icon to use as file icon, if no icon theme provides one for the language.'),
|
|
100
73
|
properties: {
|
|
101
74
|
light: {
|
|
102
|
-
description: (
|
|
103
|
-
'vscode.extension.contributes.languages.icon.light',
|
|
104
|
-
'Icon path when a light theme is used'
|
|
105
|
-
)),
|
|
75
|
+
description: localizeWithPath('vs/workbench/services/language/common/languageService', 'vscode.extension.contributes.languages.icon.light', 'Icon path when a light theme is used'),
|
|
106
76
|
type: 'string'
|
|
107
77
|
},
|
|
108
78
|
dark: {
|
|
109
|
-
description: (
|
|
110
|
-
'vscode.extension.contributes.languages.icon.dark',
|
|
111
|
-
'Icon path when a dark theme is used'
|
|
112
|
-
)),
|
|
79
|
+
description: localizeWithPath('vs/workbench/services/language/common/languageService', 'vscode.extension.contributes.languages.icon.dark', 'Icon path when a dark theme is used'),
|
|
113
80
|
type: 'string'
|
|
114
81
|
}
|
|
115
82
|
}
|
|
@@ -136,11 +103,7 @@ let WorkbenchLanguageService = class WorkbenchLanguageService extends LanguageSe
|
|
|
136
103
|
for (let i = 0, len = extensions.length; i < len; i++) {
|
|
137
104
|
const extension = extensions[i];
|
|
138
105
|
if (!Array.isArray(extension.value)) {
|
|
139
|
-
extension.collector.error((
|
|
140
|
-
'invalid',
|
|
141
|
-
"Invalid `contributes.{0}`. Expected an array.",
|
|
142
|
-
languagesExtPoint.name
|
|
143
|
-
)));
|
|
106
|
+
extension.collector.error(localizeWithPath('vs/workbench/services/language/common/languageService', 'invalid', "Invalid `contributes.{0}`. Expected an array.", languagesExtPoint.name));
|
|
144
107
|
continue;
|
|
145
108
|
}
|
|
146
109
|
for (let j = 0, lenJ = extension.value.length; j < lenJ; j++) {
|
|
@@ -217,78 +180,40 @@ function isUndefinedOrStringArray(value) {
|
|
|
217
180
|
}
|
|
218
181
|
function isValidLanguageExtensionPoint(value, extension, collector) {
|
|
219
182
|
if (!value) {
|
|
220
|
-
collector.error((
|
|
221
|
-
'invalid.empty',
|
|
222
|
-
"Empty value for `contributes.{0}`",
|
|
223
|
-
languagesExtPoint.name
|
|
224
|
-
)));
|
|
183
|
+
collector.error(localizeWithPath('vs/workbench/services/language/common/languageService', 'invalid.empty', "Empty value for `contributes.{0}`", languagesExtPoint.name));
|
|
225
184
|
return false;
|
|
226
185
|
}
|
|
227
186
|
if (typeof value.id !== 'string') {
|
|
228
|
-
collector.error((
|
|
229
|
-
'require.id',
|
|
230
|
-
"property `{0}` is mandatory and must be of type `string`",
|
|
231
|
-
'id'
|
|
232
|
-
)));
|
|
187
|
+
collector.error(localizeWithPath('vs/workbench/services/language/common/languageService', 'require.id', "property `{0}` is mandatory and must be of type `string`", 'id'));
|
|
233
188
|
return false;
|
|
234
189
|
}
|
|
235
190
|
if (!isUndefinedOrStringArray(value.extensions)) {
|
|
236
|
-
collector.error((
|
|
237
|
-
'opt.extensions',
|
|
238
|
-
"property `{0}` can be omitted and must be of type `string[]`",
|
|
239
|
-
'extensions'
|
|
240
|
-
)));
|
|
191
|
+
collector.error(localizeWithPath('vs/workbench/services/language/common/languageService', 'opt.extensions', "property `{0}` can be omitted and must be of type `string[]`", 'extensions'));
|
|
241
192
|
return false;
|
|
242
193
|
}
|
|
243
194
|
if (!isUndefinedOrStringArray(value.filenames)) {
|
|
244
|
-
collector.error((
|
|
245
|
-
'opt.filenames',
|
|
246
|
-
"property `{0}` can be omitted and must be of type `string[]`",
|
|
247
|
-
'filenames'
|
|
248
|
-
)));
|
|
195
|
+
collector.error(localizeWithPath('vs/workbench/services/language/common/languageService', 'opt.filenames', "property `{0}` can be omitted and must be of type `string[]`", 'filenames'));
|
|
249
196
|
return false;
|
|
250
197
|
}
|
|
251
198
|
if (typeof value.firstLine !== 'undefined' && typeof value.firstLine !== 'string') {
|
|
252
|
-
collector.error((
|
|
253
|
-
'opt.firstLine',
|
|
254
|
-
"property `{0}` can be omitted and must be of type `string`",
|
|
255
|
-
'firstLine'
|
|
256
|
-
)));
|
|
199
|
+
collector.error(localizeWithPath('vs/workbench/services/language/common/languageService', 'opt.firstLine', "property `{0}` can be omitted and must be of type `string`", 'firstLine'));
|
|
257
200
|
return false;
|
|
258
201
|
}
|
|
259
202
|
if (typeof value.configuration !== 'undefined' && typeof value.configuration !== 'string') {
|
|
260
|
-
collector.error((
|
|
261
|
-
'opt.configuration',
|
|
262
|
-
"property `{0}` can be omitted and must be of type `string`",
|
|
263
|
-
'configuration'
|
|
264
|
-
)));
|
|
203
|
+
collector.error(localizeWithPath('vs/workbench/services/language/common/languageService', 'opt.configuration', "property `{0}` can be omitted and must be of type `string`", 'configuration'));
|
|
265
204
|
return false;
|
|
266
205
|
}
|
|
267
206
|
if (!isUndefinedOrStringArray(value.aliases)) {
|
|
268
|
-
collector.error((
|
|
269
|
-
'opt.aliases',
|
|
270
|
-
"property `{0}` can be omitted and must be of type `string[]`",
|
|
271
|
-
'aliases'
|
|
272
|
-
)));
|
|
207
|
+
collector.error(localizeWithPath('vs/workbench/services/language/common/languageService', 'opt.aliases', "property `{0}` can be omitted and must be of type `string[]`", 'aliases'));
|
|
273
208
|
return false;
|
|
274
209
|
}
|
|
275
210
|
if (!isUndefinedOrStringArray(value.mimetypes)) {
|
|
276
|
-
collector.error((
|
|
277
|
-
'opt.mimetypes',
|
|
278
|
-
"property `{0}` can be omitted and must be of type `string[]`",
|
|
279
|
-
'mimetypes'
|
|
280
|
-
)));
|
|
211
|
+
collector.error(localizeWithPath('vs/workbench/services/language/common/languageService', 'opt.mimetypes', "property `{0}` can be omitted and must be of type `string[]`", 'mimetypes'));
|
|
281
212
|
return false;
|
|
282
213
|
}
|
|
283
214
|
if (typeof value.icon !== 'undefined') {
|
|
284
215
|
if (typeof value.icon !== 'object' || typeof value.icon.light !== 'string' || typeof value.icon.dark !== 'string') {
|
|
285
|
-
collector.error((
|
|
286
|
-
'opt.icon',
|
|
287
|
-
"property `{0}` can be omitted and must be of type `object` with properties `{1}` and `{2}` of type `string`",
|
|
288
|
-
'icon',
|
|
289
|
-
'light',
|
|
290
|
-
'dark'
|
|
291
|
-
)));
|
|
216
|
+
collector.error(localizeWithPath('vs/workbench/services/language/common/languageService', 'opt.icon', "property `{0}` can be omitted and must be of type `object` with properties `{1}` and `{2}` of type `string`", 'icon', 'light', 'dark'));
|
|
292
217
|
return false;
|
|
293
218
|
}
|
|
294
219
|
}
|