@codingame/monaco-vscode-api 1.78.4 → 1.78.5-next.0
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/README.md +28 -9
- package/dist/api.js +192 -2
- package/dist/assets/breakpointWidget.css +31 -0
- package/dist/assets/callStackEditorContribution.css +12 -0
- package/dist/assets/debug.contribution.css +138 -0
- package/dist/assets/debugHover.css +80 -0
- package/dist/assets/debugToolBar.css +49 -0
- package/dist/assets/editorquickaccess.css +8 -0
- package/dist/assets/editorstatus.css +51 -0
- package/dist/assets/exceptionWidget.css +52 -0
- package/dist/assets/notificationsActions.css +14 -0
- package/dist/assets/notificationsCenter.css +69 -0
- package/dist/assets/notificationsList.css +152 -0
- package/dist/assets/notificationsToasts.css +63 -0
- package/dist/assets/panelpart.css +75 -0
- package/dist/assets/paneview.css +148 -0
- package/dist/assets/paneviewlet.css +79 -0
- package/dist/assets/sidebysideeditor.css +9 -0
- package/dist/assets.js +15 -0
- package/dist/default-extensions/bat.js +6 -6
- package/dist/default-extensions/clojure.js +5 -5
- package/dist/default-extensions/coffeescript.js +6 -6
- package/dist/default-extensions/cpp.js +11 -11
- package/dist/default-extensions/csharp.js +6 -6
- package/dist/default-extensions/css.js +5 -5
- package/dist/default-extensions/dart.js +5 -5
- package/dist/default-extensions/diff.js +5 -5
- package/dist/default-extensions/docker.js +5 -5
- package/dist/default-extensions/fsharp.js +6 -6
- package/dist/default-extensions/go.js +5 -5
- package/dist/default-extensions/groovy.js +6 -6
- package/dist/default-extensions/handlebars.js +5 -5
- package/dist/default-extensions/hlsl.js +5 -5
- package/dist/default-extensions/html.js +7 -7
- package/dist/default-extensions/ini.js +6 -6
- package/dist/default-extensions/java.js +6 -6
- package/dist/default-extensions/javascript.js +9 -9
- package/dist/default-extensions/json.js +6 -6
- package/dist/default-extensions/julia.js +5 -5
- package/dist/default-extensions/latex.js +11 -11
- package/dist/default-extensions/less.js +5 -5
- package/dist/default-extensions/log.js +4 -4
- package/dist/default-extensions/lua.js +5 -5
- package/dist/default-extensions/make.js +5 -5
- package/dist/default-extensions/markdown-basics.js +6 -6
- package/dist/default-extensions/objective-c.js +6 -6
- package/dist/default-extensions/perl.js +7 -7
- package/dist/default-extensions/php.js +7 -7
- package/dist/default-extensions/powershell.js +5 -5
- package/dist/default-extensions/pug.js +5 -5
- package/dist/default-extensions/python.js +6 -6
- package/dist/default-extensions/r.js +5 -5
- package/dist/default-extensions/razor.js +5 -5
- package/dist/default-extensions/ruby.js +5 -5
- package/dist/default-extensions/rust.js +5 -5
- package/dist/default-extensions/scss.js +6 -6
- package/dist/default-extensions/shaderlab.js +5 -5
- package/dist/default-extensions/shellscript.js +5 -5
- package/dist/default-extensions/sql.js +5 -5
- package/dist/default-extensions/swift.js +6 -6
- package/dist/default-extensions/theme-abyss.js +4 -4
- package/dist/default-extensions/theme-defaults.js +12 -12
- package/dist/default-extensions/theme-kimbie-dark.js +4 -4
- package/dist/default-extensions/theme-monokai-dimmed.js +4 -4
- package/dist/default-extensions/theme-monokai.js +4 -4
- package/dist/default-extensions/theme-quietlight.js +4 -4
- package/dist/default-extensions/theme-red.js +4 -4
- package/dist/default-extensions/theme-seti.js +4 -4
- package/dist/default-extensions/theme-solarized-dark.js +4 -4
- package/dist/default-extensions/theme-solarized-light.js +4 -4
- package/dist/default-extensions/theme-tomorrow-night-blue.js +4 -4
- package/dist/default-extensions/typescript-basics.js +9 -9
- package/dist/default-extensions/typescript-language-features.js +3 -3
- package/dist/default-extensions/vb.js +6 -6
- package/dist/default-extensions/xml.js +7 -7
- package/dist/default-extensions/yaml.js +5 -5
- package/dist/{extension-tools-b2d018a3.js → extension-tools-b68a64de.js} +2 -15
- package/dist/extensions.js +150 -4
- package/dist/json.js +92 -0
- package/dist/monaco-treemending.js +882 -0
- package/dist/monaco.js +24 -458
- package/dist/node_modules/tslib/tslib.es6.js +21 -0
- package/dist/override/vs/workbench/browser/parts/editor/textEditor.js +2 -0
- package/dist/rollup-extension-directory-plugin.js +1 -1
- package/dist/rollup-vsix-plugin.js +1 -1
- package/dist/service-override/_46__46__47__46__46__47_vscode_47_vs_47_platform_47_audioCues_47_browser_47_media_47__42__46_mp3.js +11 -0
- package/dist/service-override/audioCue.js +13 -0
- package/dist/service-override/configuration.js +100 -0
- package/dist/service-override/debug.js +23 -0
- package/dist/service-override/dialogs.js +13 -0
- package/dist/service-override/files.js +244 -0
- package/dist/service-override/keybindings.js +100 -0
- package/dist/service-override/languages.js +27 -0
- package/dist/service-override/layout.js +41 -0
- package/dist/service-override/modelEditor.js +128 -0
- package/dist/service-override/notifications.js +34 -0
- package/dist/service-override/preferences.js +10 -0
- package/dist/{snippets.js → service-override/snippets.js} +5 -3
- package/dist/service-override/textmate.js +36 -0
- package/dist/service-override/theme.js +26 -0
- package/dist/services.d.ts +118 -1
- package/dist/services.js +59 -3
- package/dist/tools.js +20 -0
- package/dist/vscode/vs/base/browser/ui/splitview/paneview.js +289 -0
- package/dist/vscode/vs/base/common/console.js +58 -0
- package/dist/vscode/vs/base/common/date.js +204 -0
- package/dist/vscode/vs/base/common/json.js +713 -0
- package/dist/vscode/vs/base/common/jsonEdit.js +164 -0
- package/dist/vscode/vs/base/common/jsonFormatter.js +187 -0
- package/dist/vscode/vs/base/common/keybindingParser.js +87 -0
- package/dist/vscode/vs/base/common/performance.js +18 -0
- package/dist/vscode/vs/base/common/skipList.js +160 -0
- package/dist/vscode/vs/base/common/stream.js +300 -0
- package/dist/vscode/vs/base/common/uriIpc.js +32 -0
- package/dist/vscode/vs/base/parts/ipc/common/ipc.net.js +45 -0
- package/dist/vscode/vs/base/parts/request/browser/request.js +60 -0
- package/dist/vscode/vs/base/parts/request/common/request.js +8 -0
- package/dist/vscode/vs/editor/browser/config/editorConfiguration.js +91 -0
- package/dist/vscode/vs/editor/common/services/languageFeaturesService.js +41 -0
- package/dist/vscode/vs/editor/common/services/modelUndoRedoParticipant.js +56 -0
- package/dist/vscode/vs/editor/common/services/textResourceConfigurationService.js +112 -0
- package/dist/vscode/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +112 -0
- package/dist/vscode/vs/platform/debug/common/extensionHostDebug.js +3 -0
- package/dist/{extensionManagement.js → vscode/vs/platform/extensionManagement/common/extensionManagement.js} +2 -1
- package/dist/vscode/vs/platform/extensionManagement/common/extensionManagementUtil.js +14 -0
- package/dist/vscode/vs/platform/extensionManagement/common/extensionNls.js +66 -0
- package/dist/vscode/vs/platform/extensionManagement/common/implicitActivationEvents.js +53 -0
- package/dist/vscode/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +69 -0
- package/dist/vscode/vs/platform/externalServices/common/serviceMachineId.js +27 -0
- package/dist/vscode/vs/platform/files/common/fileService.js +920 -0
- package/dist/vscode/vs/platform/files/common/inMemoryFilesystemProvider.js +175 -0
- package/dist/vscode/vs/platform/files/common/io.js +80 -0
- package/dist/vscode/vs/platform/files/common/watcher.js +69 -0
- package/dist/vscode/vs/platform/keyboardLayout/common/keyboardConfig.js +42 -0
- package/dist/vscode/vs/platform/keyboardLayout/common/keyboardLayout.js +12 -0
- package/dist/vscode/vs/platform/keyboardLayout/common/keyboardMapper.js +23 -0
- package/dist/vscode/vs/platform/product/common/productService.js +4 -0
- package/dist/vscode/vs/platform/remote/common/remoteAuthorityResolver.js +17 -0
- package/dist/vscode/vs/platform/remote/common/remoteHosts.js +18 -0
- package/dist/vscode/vs/platform/request/browser/requestService.js +25 -0
- package/dist/vscode/vs/platform/request/common/request.js +50 -0
- package/dist/vscode/vs/platform/telemetry/common/telemetryUtils.js +119 -0
- package/dist/{tokenClassificationRegistry.js → vscode/vs/platform/theme/common/tokenClassificationRegistry.js} +82 -136
- package/dist/vscode/vs/platform/tunnel/common/tunnel.js +3 -0
- package/dist/vscode/vs/platform/uriIdentity/common/uriIdentity.js +3 -0
- package/dist/vscode/vs/platform/uriIdentity/common/uriIdentityService.js +80 -0
- package/dist/vscode/vs/platform/userDataProfile/common/userDataProfile.js +427 -0
- package/dist/vscode/vs/platform/userDataSync/common/content.js +9 -0
- package/dist/vscode/vs/platform/userDataSync/common/settingsMerge.js +299 -0
- package/dist/vscode/vs/platform/workspace/common/editSessions.js +3 -0
- package/dist/vscode/vs/platform/workspace/common/virtualWorkspace.js +17 -0
- package/dist/vscode/vs/platform/workspaces/common/workspaces.js +195 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadBulkEdits.js +49 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadClipboard.js +22 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadCommands.js +93 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadConfiguration.js +78 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadConsole.js +33 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadDebugService.js +347 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadDiagnostics.js +67 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +73 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadDocuments.js +246 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +379 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadEditor.js +410 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadEditors.js +223 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadExtensionService.js +213 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadFileSystem.js +270 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadFileSystemEventService.js +223 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadLanguageFeatures.js +909 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadLanguages.js +76 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadMessageService.js +114 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadOutputService.js +73 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadProgress.js +62 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadQuickOpen.js +183 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadSaveParticipant.js +43 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadTelemetry.js +50 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadWindow.js +48 -0
- package/dist/vscode/vs/workbench/api/browser/mainThreadWorkspace.js +227 -0
- package/dist/vscode/vs/workbench/api/common/cache.js +28 -0
- package/dist/vscode/vs/workbench/api/common/configurationExtensionPoint.js +450 -0
- package/dist/vscode/vs/workbench/api/common/extHost.protocol.js +131 -0
- package/dist/vscode/vs/workbench/api/common/extHostApiCommands.js +656 -0
- package/dist/vscode/vs/workbench/api/common/extHostApiDeprecationService.js +35 -0
- package/dist/vscode/vs/workbench/api/common/extHostBulkEdits.js +21 -0
- package/dist/vscode/vs/workbench/api/common/extHostClipboard.js +15 -0
- package/dist/vscode/vs/workbench/api/common/extHostCommands.js +415 -0
- package/dist/vscode/vs/workbench/api/common/extHostConfiguration.js +264 -0
- package/dist/vscode/vs/workbench/api/common/extHostDebugService.js +786 -0
- package/dist/vscode/vs/workbench/api/common/extHostDecorations.js +94 -0
- package/dist/vscode/vs/workbench/api/common/extHostDiagnostics.js +292 -0
- package/dist/vscode/vs/workbench/api/common/extHostDocumentContentProviders.js +65 -0
- package/dist/vscode/vs/workbench/api/common/extHostDocumentData.js +212 -0
- package/dist/vscode/vs/workbench/api/common/extHostDocumentSaveParticipant.js +126 -0
- package/dist/vscode/vs/workbench/api/common/extHostDocuments.js +144 -0
- package/dist/vscode/vs/workbench/api/common/extHostDocumentsAndEditors.js +147 -0
- package/dist/vscode/vs/workbench/api/common/extHostEditorTabs.js +328 -0
- package/dist/vscode/vs/workbench/api/common/extHostExtensionActivator.js +309 -0
- package/dist/vscode/vs/workbench/api/common/extHostExtensionService.js +814 -0
- package/dist/vscode/vs/workbench/api/common/extHostFileSystem.js +272 -0
- package/dist/vscode/vs/workbench/api/common/extHostFileSystemConsumer.js +153 -0
- package/dist/vscode/vs/workbench/api/common/extHostFileSystemEventService.js +193 -0
- package/dist/vscode/vs/workbench/api/common/extHostFileSystemInfo.js +35 -0
- package/dist/vscode/vs/workbench/api/common/extHostInitDataService.js +3 -0
- package/dist/vscode/vs/workbench/api/common/extHostLanguageFeatures.js +2038 -0
- package/dist/vscode/vs/workbench/api/common/extHostLanguages.js +164 -0
- package/dist/vscode/vs/workbench/api/common/extHostLocalizationService.js +85 -0
- package/dist/vscode/vs/workbench/api/common/extHostMemento.js +74 -0
- package/dist/vscode/vs/workbench/api/common/extHostMessageService.js +55 -0
- package/dist/vscode/vs/workbench/api/common/extHostOutput.js +257 -0
- package/dist/vscode/vs/workbench/api/common/extHostProgress.js +80 -0
- package/dist/vscode/vs/workbench/api/common/extHostQuickOpen.js +580 -0
- package/dist/vscode/vs/workbench/api/common/extHostRpcService.js +12 -0
- package/dist/vscode/vs/workbench/api/common/extHostSecretState.js +24 -0
- package/dist/vscode/vs/workbench/api/common/extHostSecrets.js +29 -0
- package/dist/vscode/vs/workbench/api/common/extHostStorage.js +42 -0
- package/dist/vscode/vs/workbench/api/common/extHostStoragePaths.js +64 -0
- package/dist/vscode/vs/workbench/api/common/extHostTelemetry.js +266 -0
- package/dist/vscode/vs/workbench/api/common/extHostTerminalService.js +3 -0
- package/dist/vscode/vs/workbench/api/common/extHostTestItem.js +122 -0
- package/dist/vscode/vs/workbench/api/common/extHostTestingPrivateApi.js +15 -0
- package/dist/vscode/vs/workbench/api/common/extHostTextEditor.js +511 -0
- package/dist/vscode/vs/workbench/api/common/extHostTextEditors.js +128 -0
- package/dist/vscode/vs/workbench/api/common/extHostTunnelService.js +36 -0
- package/dist/vscode/vs/workbench/api/common/extHostTypeConverters.js +1766 -0
- package/dist/vscode/vs/workbench/api/common/extHostTypes.js +2810 -0
- package/dist/vscode/vs/workbench/api/common/extHostUriTransformerService.js +19 -0
- package/dist/vscode/vs/workbench/api/common/extHostVariableResolverService.js +138 -0
- package/dist/vscode/vs/workbench/api/common/extHostWindow.js +59 -0
- package/dist/vscode/vs/workbench/api/common/extHostWorkspace.js +534 -0
- package/dist/vscode/vs/workbench/api/common/jsonValidationExtensionPoint.js +97 -0
- package/dist/vscode/vs/workbench/api/common/shared/dataTransferCache.js +36 -0
- package/dist/vscode/vs/workbench/browser/actions/layoutActions.js +1201 -0
- package/dist/vscode/vs/workbench/browser/actions.js +77 -0
- package/dist/vscode/vs/workbench/browser/codeeditor.js +185 -0
- package/dist/vscode/vs/workbench/browser/composite.js +102 -0
- package/dist/vscode/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +146 -0
- package/dist/vscode/vs/workbench/browser/parts/dialogs/dialog.web.contribution.js +68 -0
- package/dist/vscode/vs/workbench/browser/parts/dialogs/dialogHandler.js +124 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.contribution.js +876 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorActions.js +1946 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorAutoSave.js +157 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorCommands.js +1289 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorPane.js +242 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorQuickAccess.js +213 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorStatus.js +460 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorWithViewState.js +139 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/sideBySideEditor.js +387 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/textDiffEditor.js +289 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsActions.js +124 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsAlerts.js +58 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsCenter.js +224 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsCommands.js +241 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsList.js +185 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsTelemetry.js +35 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsToasts.js +417 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsViewer.js +392 -0
- package/dist/vscode/vs/workbench/browser/parts/panel/panelActions.js +422 -0
- package/dist/vscode/vs/workbench/browser/parts/views/viewPane.js +520 -0
- package/dist/vscode/vs/workbench/browser/quickaccess.js +17 -0
- package/dist/vscode/vs/workbench/common/component.js +23 -0
- package/dist/vscode/vs/workbench/common/configuration.js +8 -0
- package/dist/vscode/vs/workbench/common/contextkeys.js +170 -0
- package/dist/vscode/vs/workbench/common/contributions.js +111 -0
- package/dist/vscode/vs/workbench/common/dialogs.js +31 -0
- package/dist/vscode/vs/workbench/common/editor/binaryEditorModel.js +39 -0
- package/dist/vscode/vs/workbench/common/editor/diffEditorInput.js +164 -0
- package/dist/vscode/vs/workbench/common/editor/diffEditorModel.js +23 -0
- package/dist/vscode/vs/workbench/common/editor/editorInput.js +97 -0
- package/dist/vscode/vs/workbench/common/editor/editorModel.js +26 -0
- package/dist/vscode/vs/workbench/common/editor/editorOptions.js +48 -0
- package/dist/vscode/vs/workbench/common/editor/resourceEditorInput.js +133 -0
- package/dist/vscode/vs/workbench/common/editor/sideBySideEditorInput.js +228 -0
- package/dist/vscode/vs/workbench/common/editor/textDiffEditorModel.js +42 -0
- package/dist/vscode/vs/workbench/common/editor/textEditorModel.js +165 -0
- package/dist/vscode/vs/workbench/common/editor/textResourceEditorInput.js +146 -0
- package/dist/vscode/vs/workbench/common/editor/textResourceEditorModel.js +24 -0
- package/dist/vscode/vs/workbench/common/editor.js +307 -0
- package/dist/{memento.js → vscode/vs/workbench/common/memento.js} +1 -1
- package/dist/vscode/vs/workbench/common/notifications.js +448 -0
- package/dist/vscode/vs/workbench/common/resources.js +86 -0
- package/dist/{theme2.js → vscode/vs/workbench/common/theme.js} +1 -168
- package/dist/vscode/vs/workbench/common/views.js +20 -0
- package/dist/vscode/vs/workbench/contrib/audioCues/browser/audioCueDebuggerContribution.js +45 -0
- package/dist/vscode/vs/workbench/contrib/audioCues/browser/audioCueLineFeatureContribution.js +170 -0
- package/dist/vscode/vs/workbench/contrib/audioCues/browser/audioCues.contribution.js +160 -0
- package/dist/vscode/vs/workbench/contrib/audioCues/browser/commands.js +49 -0
- package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkCellEdits.js +25 -0
- package/dist/vscode/vs/workbench/contrib/callHierarchy/common/callHierarchy.js +126 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/editorLineNumberMenu.js +100 -0
- package/dist/{languages.js → vscode/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js} +154 -180
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/menuPreventer.js +35 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/selectionClipboard.js +2 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.js +50 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/baseDebugView.js +192 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +776 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/breakpointWidget.js +378 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/breakpointsView.js +714 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +172 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debug.contribution.js +451 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugActionViewItems.js +294 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugAdapterManager.js +397 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugColors.js +309 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugCommands.js +749 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +619 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +58 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorContribution.js +675 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugHover.js +317 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugIcons.js +135 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugMemory.js +204 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugQuickAccess.js +142 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugService.js +1171 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugSession.js +1134 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugSessionPicker.js +104 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugTaskRunner.js +273 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugToolBar.js +312 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/exceptionWidget.js +103 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/linkDetector.js +229 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/rawDebugSession.js +666 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/variablesView.js +287 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +150 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/breakpoints.js +19 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/debug.js +285 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/debugCompoundRoot.js +15 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/debugContentProvider.js +96 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/debugModel.js +1451 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/debugSchemas.js +344 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/debugSource.js +121 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/debugStorage.js +148 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/debugTelemetry.js +34 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/debugUtils.js +292 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/debugViewModel.js +107 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/debugger.js +254 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/disassemblyViewInput.js +25 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +81 -0
- package/dist/vscode/vs/workbench/contrib/debug/common/replModel.js +230 -0
- package/dist/vscode/vs/workbench/contrib/extensions/common/extensions.js +3 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +321 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/explorerService.js +398 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/files.contribution.js +389 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/files.js +3 -0
- package/dist/vscode/vs/workbench/contrib/files/common/explorerFileNestingTrie.js +212 -0
- package/dist/vscode/vs/workbench/contrib/files/common/explorerModel.js +369 -0
- package/dist/{files2.js → vscode/vs/workbench/contrib/files/common/files.js} +1 -1
- package/dist/vscode/vs/workbench/contrib/markers/common/markers.js +20 -0
- package/dist/vscode/vs/workbench/contrib/notebook/common/notebookCommon.js +9 -0
- package/dist/vscode/vs/workbench/contrib/output/browser/outputLinkProvider.js +74 -0
- package/dist/vscode/vs/workbench/contrib/output/browser/outputServices.js +166 -0
- package/dist/vscode/vs/workbench/contrib/output/common/outputChannelModel.js +317 -0
- package/dist/vscode/vs/workbench/contrib/output/common/outputChannelModelService.js +31 -0
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +153 -0
- package/dist/vscode/vs/workbench/contrib/search/common/search.js +27 -0
- package/dist/vscode/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +159 -0
- package/dist/vscode/vs/workbench/contrib/snippets/browser/snippets.js +3 -0
- package/dist/vscode/vs/workbench/contrib/snippets/browser/snippetsFile.js +229 -0
- package/dist/{snippetsService.js → vscode/vs/workbench/contrib/snippets/browser/snippetsService.js} +28 -412
- package/dist/vscode/vs/workbench/contrib/snippets/browser/tabCompletion.js +166 -0
- package/dist/vscode/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +161 -0
- package/dist/vscode/vs/workbench/contrib/tasks/common/taskService.js +3 -0
- package/dist/vscode/vs/workbench/contrib/testing/common/testId.js +109 -0
- package/dist/vscode/vs/workbench/contrib/testing/common/testItemCollection.js +75 -0
- package/dist/vscode/vs/workbench/contrib/testing/common/testTypes.js +7 -0
- package/dist/vscode/vs/workbench/contrib/typeHierarchy/common/typeHierarchy.js +133 -0
- package/dist/vscode/vs/workbench/services/actions/common/menusExtensionPoint.js +829 -0
- package/dist/vscode/vs/workbench/services/activity/common/activity.js +22 -0
- package/dist/vscode/vs/workbench/services/configuration/browser/configuration.js +847 -0
- package/dist/vscode/vs/workbench/services/configuration/browser/configurationService.js +1104 -0
- package/dist/{configuration2.js → vscode/vs/workbench/services/configuration/common/configuration.js} +1 -1
- package/dist/vscode/vs/workbench/services/configuration/common/configurationCache.js +80 -0
- package/dist/vscode/vs/workbench/services/configuration/common/configurationEditing.js +590 -0
- package/dist/vscode/vs/workbench/services/configuration/common/configurationModels.js +119 -0
- package/dist/vscode/vs/workbench/services/configuration/common/jsonEditing.js +9 -0
- package/dist/vscode/vs/workbench/services/configuration/common/jsonEditingService.js +119 -0
- package/dist/vscode/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +303 -0
- package/dist/vscode/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +26 -0
- package/dist/vscode/vs/workbench/services/configurationResolver/common/configurationResolver.js +36 -0
- package/dist/vscode/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +174 -0
- package/dist/vscode/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +10 -0
- package/dist/vscode/vs/workbench/services/configurationResolver/common/variableResolver.js +299 -0
- package/dist/vscode/vs/workbench/services/decorations/browser/decorationsService.js +312 -0
- package/dist/vscode/vs/workbench/services/decorations/common/decorations.js +3 -0
- package/dist/vscode/vs/workbench/services/dialogs/common/dialogService.js +65 -0
- package/dist/vscode/vs/workbench/services/editor/browser/codeEditorService.js +80 -0
- package/dist/vscode/vs/workbench/services/editor/common/editorGroupColumn.js +23 -0
- package/dist/vscode/vs/workbench/services/editor/common/editorGroupsService.js +14 -0
- package/dist/vscode/vs/workbench/services/editor/common/editorResolverService.js +31 -0
- package/dist/vscode/vs/workbench/services/editor/common/editorService.js +10 -0
- package/dist/vscode/vs/workbench/services/environment/browser/environmentService.js +4 -0
- package/dist/vscode/vs/workbench/services/environment/common/environmentService.js +4 -0
- package/dist/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.js +6 -0
- package/dist/vscode/vs/workbench/services/extensions/common/extHostCustomers.js +40 -0
- package/dist/vscode/vs/workbench/services/extensions/common/extensionDescriptionRegistry.js +189 -0
- package/dist/vscode/vs/workbench/services/extensions/common/extensionDevOptions.js +23 -0
- package/dist/vscode/vs/workbench/services/extensions/common/extensionHostProtocol.js +6 -0
- package/dist/vscode/vs/workbench/services/extensions/common/extensions.js +57 -0
- package/dist/vscode/vs/workbench/services/extensions/common/extensionsApiProposals.js +74 -0
- package/dist/{extensionsRegistry.js → vscode/vs/workbench/services/extensions/common/extensionsRegistry.js} +87 -208
- package/dist/vscode/vs/workbench/services/extensions/common/lazyPromise.js +70 -0
- package/dist/vscode/vs/workbench/services/extensions/common/proxyIdentifier.js +23 -0
- package/dist/vscode/vs/workbench/services/extensions/common/remoteConsoleUtil.js +47 -0
- package/dist/vscode/vs/workbench/services/extensions/common/rpcProtocol.js +762 -0
- package/dist/vscode/vs/workbench/services/extensions/common/workspaceContains.js +92 -0
- package/dist/vscode/vs/workbench/services/files/browser/elevatedFileService.js +9 -0
- package/dist/vscode/vs/workbench/services/files/common/elevatedFileService.js +3 -0
- package/dist/vscode/vs/workbench/services/files/common/files.js +4 -0
- package/dist/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +124 -0
- package/dist/vscode/vs/workbench/services/history/common/history.js +3 -0
- package/dist/vscode/vs/workbench/services/host/browser/host.js +3 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keybindingService.js +855 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayoutService.js +490 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/cz.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/de-swiss.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/de.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/de.linux.js +180 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/de.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/dk.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/dvorak.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/en-belgian.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/en-ext.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/en-in.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/en-intl.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/en-intl.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/en-uk.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/en-uk.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/en.darwin.js +133 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/en.linux.js +182 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/en.win.js +167 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/es-latin.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/es.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/es.linux.js +180 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/es.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/fr.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/fr.linux.js +180 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/fr.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/hu.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/it.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/it.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/jp-roman.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/jp.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/ko.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.darwin.js +17 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.linux.js +6 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.win.js +23 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/no.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/pl.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/pl.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/pt-br.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/pt.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/pt.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/ru.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/ru.linux.js +180 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/ru.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/sv.win.js +164 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/thai.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/tr.win.js +162 -0
- package/dist/vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/zh-hans.darwin.js +125 -0
- package/dist/vscode/vs/workbench/services/keybinding/common/fallbackKeyboardMapper.js +28 -0
- package/dist/vscode/vs/workbench/services/keybinding/common/keybindingIO.js +72 -0
- package/dist/vscode/vs/workbench/services/keybinding/common/keymapInfo.js +108 -0
- package/dist/vscode/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.js +888 -0
- package/dist/vscode/vs/workbench/services/keybinding/common/windowsKeyboardMapper.js +350 -0
- package/dist/vscode/vs/workbench/services/label/common/labelService.js +302 -0
- package/dist/{languageService.js → vscode/vs/workbench/services/language/common/languageService.js} +8 -163
- package/dist/vscode/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.js +5 -0
- package/dist/vscode/vs/workbench/services/languageStatus/common/languageStatusService.js +3 -0
- package/dist/vscode/vs/workbench/services/layout/browser/layoutService.js +12 -0
- package/dist/vscode/vs/workbench/services/lifecycle/common/lifecycle.js +11 -0
- package/dist/vscode/vs/workbench/services/lifecycle/common/lifecycleService.js +85 -0
- package/dist/vscode/vs/workbench/services/notification/common/notificationService.js +186 -0
- package/dist/vscode/vs/workbench/services/output/common/output.js +51 -0
- package/dist/vscode/vs/workbench/services/panecomposite/browser/panecomposite.js +3 -0
- package/dist/vscode/vs/workbench/services/path/browser/pathService.js +34 -0
- package/dist/vscode/vs/workbench/services/path/common/pathService.js +107 -0
- package/dist/vscode/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +35 -0
- package/dist/vscode/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +555 -0
- package/dist/vscode/vs/workbench/services/preferences/browser/preferencesService.js +547 -0
- package/dist/vscode/vs/workbench/services/preferences/common/preferences.js +20 -0
- package/dist/vscode/vs/workbench/services/preferences/common/preferencesEditorInput.js +37 -0
- package/dist/vscode/vs/workbench/services/preferences/common/preferencesModels.js +1031 -0
- package/dist/vscode/vs/workbench/services/preferences/common/preferencesValidation.js +357 -0
- package/dist/vscode/vs/workbench/services/progress/browser/progressIndicator.js +174 -0
- package/dist/vscode/vs/workbench/services/remote/common/remoteAgentService.js +3 -0
- package/dist/vscode/vs/workbench/services/search/common/queryBuilder.js +428 -0
- package/dist/vscode/vs/workbench/services/search/common/search.js +158 -0
- package/dist/vscode/vs/workbench/services/search/common/searchHelpers.js +72 -0
- package/dist/vscode/vs/workbench/services/search/common/searchService.js +355 -0
- package/dist/vscode/vs/workbench/services/textMate/browser/arrayOperation.js +62 -0
- package/dist/vscode/vs/workbench/services/textMate/browser/textMateTokenizationFeature.js +3 -0
- package/dist/vscode/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.js +422 -0
- package/dist/vscode/vs/workbench/services/textMate/browser/tokenizationSupport/textMateTokenizationSupport.js +60 -0
- package/dist/vscode/vs/workbench/services/textMate/browser/tokenizationSupport/tokenizationSupportWithLineLimit.js +36 -0
- package/dist/vscode/vs/workbench/services/textMate/browser/workerHost/textMateWorkerHost.js +198 -0
- package/dist/vscode/vs/workbench/services/textMate/browser/workerHost/textMateWorkerTokenizerController.js +151 -0
- package/dist/vscode/vs/workbench/services/textMate/common/TMGrammarFactory.js +117 -0
- package/dist/vscode/vs/workbench/services/textMate/common/TMGrammars.js +93 -0
- package/dist/vscode/vs/workbench/services/textMate/common/TMScopeRegistry.js +24 -0
- package/dist/vscode/vs/workbench/services/textfile/browser/browserTextFileService.js +55 -0
- package/dist/vscode/vs/workbench/services/textfile/browser/textFileService.js +578 -0
- package/dist/vscode/vs/workbench/services/textfile/common/encoding.js +493 -0
- package/dist/vscode/vs/workbench/services/textfile/common/textEditorService.js +150 -0
- package/dist/vscode/vs/workbench/services/textfile/common/textFileEditorModel.js +711 -0
- package/dist/vscode/vs/workbench/services/textfile/common/textFileEditorModelManager.js +401 -0
- package/dist/vscode/vs/workbench/services/textfile/common/textFileSaveParticipant.js +54 -0
- package/dist/vscode/vs/workbench/services/textfile/common/textfiles.js +45 -0
- package/dist/vscode/vs/workbench/services/textmodelResolver/common/textModelResolverService.js +187 -0
- package/dist/vscode/vs/workbench/services/themes/browser/browserHostColorSchemeService.js +37 -0
- package/dist/vscode/vs/workbench/services/themes/browser/fileIconThemeData.js +353 -0
- package/dist/vscode/vs/workbench/services/themes/browser/productIconThemeData.js +291 -0
- package/dist/vscode/vs/workbench/services/themes/browser/workbenchThemeService.js +736 -0
- package/dist/vscode/vs/workbench/services/themes/common/colorExtensionPoint.js +171 -0
- package/dist/vscode/vs/workbench/services/themes/common/colorThemeData.js +864 -0
- package/dist/vscode/vs/workbench/services/themes/common/colorThemeSchema.js +265 -0
- package/dist/vscode/vs/workbench/services/themes/common/fileIconThemeSchema.js +303 -0
- package/dist/vscode/vs/workbench/services/themes/common/hostColorSchemeService.js +3 -0
- package/dist/vscode/vs/workbench/services/themes/common/plistParser.js +439 -0
- package/dist/vscode/vs/workbench/services/themes/common/productIconThemeSchema.js +94 -0
- package/dist/vscode/vs/workbench/services/themes/common/textMateScopeMatcher.js +120 -0
- package/dist/vscode/vs/workbench/services/themes/common/themeCompatibility.js +66 -0
- package/dist/vscode/vs/workbench/services/themes/common/themeConfiguration.js +374 -0
- package/dist/vscode/vs/workbench/services/themes/common/themeExtensionPoints.js +258 -0
- package/dist/vscode/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +268 -0
- package/dist/vscode/vs/workbench/services/themes/common/workbenchThemeService.js +46 -0
- package/dist/vscode/vs/workbench/services/timer/browser/timerService.js +3 -0
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput.js +122 -0
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorModel.js +240 -0
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorService.js +3 -0
- package/dist/vscode/vs/workbench/services/userData/browser/userDataInit.js +3 -0
- package/dist/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.js +7 -0
- package/dist/vscode/vs/workbench/services/userDataProfile/common/userDataProfileService.js +52 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +55 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopy.js +2 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyBackup.js +3 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyBackupService.js +414 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant.js +39 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.js +181 -0
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyService.js +112 -0
- package/dist/vscode/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js +325 -0
- package/dist/vscode/vs/workbench/services/workspaces/browser/workspaces.js +11 -0
- package/dist/vscode/vs/workbench/services/workspaces/browser/workspacesService.js +154 -0
- package/dist/vscode/vs/workbench/services/workspaces/common/workspaceEditing.js +3 -0
- package/dist/vscode-default-extensions/bat/package.json.js +2 -0
- package/dist/vscode-default-extensions/clojure/package.json.js +2 -0
- package/dist/vscode-default-extensions/coffeescript/package.json.js +2 -0
- package/dist/vscode-default-extensions/cpp/package.json.js +2 -0
- package/dist/vscode-default-extensions/csharp/package.json.js +2 -0
- package/dist/vscode-default-extensions/css/package.json.js +2 -0
- package/dist/vscode-default-extensions/dart/package.json.js +2 -0
- package/dist/vscode-default-extensions/diff/package.json.js +2 -0
- package/dist/vscode-default-extensions/docker/package.json.js +2 -0
- package/dist/vscode-default-extensions/fsharp/package.json.js +2 -0
- package/dist/vscode-default-extensions/go/package.json.js +2 -0
- package/dist/vscode-default-extensions/groovy/package.json.js +2 -0
- package/dist/vscode-default-extensions/handlebars/package.json.js +2 -0
- package/dist/vscode-default-extensions/hlsl/package.json.js +2 -0
- package/dist/vscode-default-extensions/html/package.json.js +2 -0
- package/dist/vscode-default-extensions/ini/package.json.js +2 -0
- package/dist/vscode-default-extensions/java/package.json.js +2 -0
- package/dist/vscode-default-extensions/javascript/package.json.js +2 -0
- package/dist/vscode-default-extensions/json/package.json.js +2 -0
- package/dist/vscode-default-extensions/julia/package.json.js +2 -0
- package/dist/vscode-default-extensions/latex/package.json.js +2 -0
- package/dist/vscode-default-extensions/less/package.json.js +2 -0
- package/dist/vscode-default-extensions/log/package.json.js +2 -0
- package/dist/vscode-default-extensions/lua/package.json.js +2 -0
- package/dist/vscode-default-extensions/make/package.json.js +2 -0
- package/dist/vscode-default-extensions/markdown-basics/package.json.js +2 -0
- package/dist/vscode-default-extensions/objective-c/package.json.js +2 -0
- package/dist/vscode-default-extensions/perl/package.json.js +2 -0
- package/dist/vscode-default-extensions/php/package.json.js +2 -0
- package/dist/vscode-default-extensions/powershell/package.json.js +2 -0
- package/dist/vscode-default-extensions/pug/package.json.js +2 -0
- package/dist/vscode-default-extensions/python/package.json.js +2 -0
- package/dist/vscode-default-extensions/r/package.json.js +2 -0
- package/dist/vscode-default-extensions/razor/package.json.js +2 -0
- package/dist/vscode-default-extensions/ruby/package.json.js +2 -0
- package/dist/vscode-default-extensions/rust/package.json.js +2 -0
- package/dist/vscode-default-extensions/scss/package.json.js +2 -0
- package/dist/vscode-default-extensions/shaderlab/package.json.js +2 -0
- package/dist/vscode-default-extensions/shellscript/package.json.js +2 -0
- package/dist/vscode-default-extensions/sql/package.json.js +2 -0
- package/dist/vscode-default-extensions/swift/package.json.js +2 -0
- package/dist/vscode-default-extensions/theme-abyss/package.json.js +2 -0
- package/dist/vscode-default-extensions/theme-defaults/package.json.js +2 -0
- package/dist/vscode-default-extensions/theme-kimbie-dark/package.json.js +2 -0
- package/dist/vscode-default-extensions/theme-monokai/package.json.js +2 -0
- package/dist/vscode-default-extensions/theme-monokai-dimmed/package.json.js +2 -0
- package/dist/vscode-default-extensions/theme-quietlight/package.json.js +2 -0
- package/dist/vscode-default-extensions/theme-red/package.json.js +2 -0
- package/dist/vscode-default-extensions/theme-seti/package.json.js +2 -0
- package/dist/vscode-default-extensions/theme-solarized-dark/package.json.js +2 -0
- package/dist/vscode-default-extensions/theme-solarized-light/package.json.js +2 -0
- package/dist/vscode-default-extensions/theme-tomorrow-night-blue/package.json.js +2 -0
- package/dist/vscode-default-extensions/typescript-basics/package.json.js +2 -0
- package/dist/vscode-default-extensions/typescript-language-features/package.json.js +2 -0
- package/dist/vscode-default-extensions/vb/package.json.js +2 -0
- package/dist/vscode-default-extensions/xml/package.json.js +2 -0
- package/dist/vscode-default-extensions/yaml/package.json.js +2 -0
- package/dist/vscode-services/commands.js +37 -0
- package/dist/vscode-services/debug.js +74 -0
- package/dist/vscode-services/env.js +69 -0
- package/dist/vscode-services/extHost.js +385 -0
- package/dist/vscode-services/extensions.js +46 -0
- package/dist/vscode-services/languages.js +203 -0
- package/dist/vscode-services/missing-services.js +959 -0
- package/dist/vscode-services/window.js +189 -0
- package/dist/vscode-services/workspace.js +164 -0
- package/monaco-editor-treemending.patch +23574 -0
- package/monaco-treemending.js +3 -0
- package/package.json +55 -59
- package/dist/api2.js +0 -1294
- package/dist/audioCue.js +0 -805
- package/dist/button.js +0 -352
- package/dist/configuration.js +0 -4438
- package/dist/debug.js +0 -15673
- package/dist/dialogs.js +0 -752
- package/dist/dom.js +0 -101
- package/dist/files.js +0 -3167
- package/dist/keybindings.js +0 -4310
- package/dist/layout.contribution.darwin.js +0 -1994
- package/dist/layout.contribution.linux.js +0 -899
- package/dist/layout.contribution.win.js +0 -3551
- package/dist/modelEditor.js +0 -8893
- package/dist/notifications.js +0 -2302
- package/dist/platform.js +0 -105
- package/dist/polyfill.js +0 -55651
- package/dist/preferences.js +0 -2532
- package/dist/textmate.js +0 -1428
- package/dist/theme.js +0 -4116
- package/dist/utils.js +0 -345
- package/dist/webpack-loader.cjs +0 -18
- package/dist/webpack-loader.d.ts +0 -4
- package/dist/{iconv.js → override/iconv.js} +0 -0
- package/dist/{jschardet.js → override/jschardet.js} +0 -0
- package/dist/{audioCue.d.ts → service-override/audioCue.d.ts} +0 -0
- package/dist/{configuration.d.ts → service-override/configuration.d.ts} +0 -0
- package/dist/{debug.d.ts → service-override/debug.d.ts} +0 -0
- package/dist/{dialogs.d.ts → service-override/dialogs.d.ts} +0 -0
- package/dist/{files.d.ts → service-override/files.d.ts} +0 -0
- package/dist/{keybindings.d.ts → service-override/keybindings.d.ts} +0 -0
- package/dist/{languages.d.ts → service-override/languages.d.ts} +0 -0
- package/dist/{modelEditor.d.ts → service-override/modelEditor.d.ts} +0 -0
- package/dist/{notifications.d.ts → service-override/notifications.d.ts} +0 -0
- package/dist/{preferences.d.ts → service-override/preferences.d.ts} +0 -0
- package/dist/{snippets.d.ts → service-override/snippets.d.ts} +0 -0
- package/dist/{textmate.d.ts → service-override/textmate.d.ts} +0 -0
- package/dist/{theme.d.ts → service-override/theme.d.ts} +0 -0
- package/dist/{injection.js → tools/injection.js} +0 -0
- package/dist/{jsonErrorMessages.js → vscode/vs/base/common/jsonErrorMessages.js} +0 -0
- package/dist/{_.contribution.js → vscode/vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution.js} +0 -0
- package/dist/{unboundCommands.js → vscode/vs/workbench/services/keybinding/browser/unboundCommands.js} +2 -2
- /package/dist/{language-configuration.js → vscode-default-extensions/bat/language-configuration.json.js} +0 -0
- /package/dist/{batchfile.js → vscode-default-extensions/bat/snippets/batchfile.code-snippets.js} +0 -0
- /package/dist/{batchfile.tmLanguage.js → vscode-default-extensions/bat/syntaxes/batchfile.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration2.js → vscode-default-extensions/clojure/language-configuration.json.js} +0 -0
- /package/dist/{clojure.tmLanguage.js → vscode-default-extensions/clojure/syntaxes/clojure.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration3.js → vscode-default-extensions/coffeescript/language-configuration.json.js} +0 -0
- /package/dist/{coffeescript.js → vscode-default-extensions/coffeescript/snippets/coffeescript.code-snippets.js} +0 -0
- /package/dist/{coffeescript.tmLanguage.js → vscode-default-extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration4.js → vscode-default-extensions/cpp/language-configuration.json.js} +0 -0
- /package/dist/{c.js → vscode-default-extensions/cpp/snippets/c.code-snippets.js} +0 -0
- /package/dist/{cpp.js → vscode-default-extensions/cpp/snippets/cpp.code-snippets.js} +0 -0
- /package/dist/{c.tmLanguage.js → vscode-default-extensions/cpp/syntaxes/c.tmLanguage.json.js} +0 -0
- /package/dist/{cpp.embedded.macro.tmLanguage.js → vscode-default-extensions/cpp/syntaxes/cpp.embedded.macro.tmLanguage.json.js} +0 -0
- /package/dist/{cpp.tmLanguage.js → vscode-default-extensions/cpp/syntaxes/cpp.tmLanguage.json.js} +0 -0
- /package/dist/{cuda-cpp.tmLanguage.js → vscode-default-extensions/cpp/syntaxes/cuda-cpp.tmLanguage.json.js} +0 -0
- /package/dist/{platform.tmLanguage.js → vscode-default-extensions/cpp/syntaxes/platform.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration5.js → vscode-default-extensions/csharp/language-configuration.json.js} +0 -0
- /package/dist/{csharp.js → vscode-default-extensions/csharp/snippets/csharp.code-snippets.js} +0 -0
- /package/dist/{csharp.tmLanguage.js → vscode-default-extensions/csharp/syntaxes/csharp.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration6.js → vscode-default-extensions/css/language-configuration.json.js} +0 -0
- /package/dist/{css.tmLanguage.js → vscode-default-extensions/css/syntaxes/css.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration7.js → vscode-default-extensions/dart/language-configuration.json.js} +0 -0
- /package/dist/{dart.tmLanguage.js → vscode-default-extensions/dart/syntaxes/dart.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration8.js → vscode-default-extensions/diff/language-configuration.json.js} +0 -0
- /package/dist/{diff.tmLanguage.js → vscode-default-extensions/diff/syntaxes/diff.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration9.js → vscode-default-extensions/docker/language-configuration.json.js} +0 -0
- /package/dist/{docker.tmLanguage.js → vscode-default-extensions/docker/syntaxes/docker.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration10.js → vscode-default-extensions/fsharp/language-configuration.json.js} +0 -0
- /package/dist/{fsharp.js → vscode-default-extensions/fsharp/snippets/fsharp.code-snippets.js} +0 -0
- /package/dist/{fsharp.tmLanguage.js → vscode-default-extensions/fsharp/syntaxes/fsharp.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration11.js → vscode-default-extensions/go/language-configuration.json.js} +0 -0
- /package/dist/{go.tmLanguage.js → vscode-default-extensions/go/syntaxes/go.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration12.js → vscode-default-extensions/groovy/language-configuration.json.js} +0 -0
- /package/dist/{groovy.js → vscode-default-extensions/groovy/snippets/groovy.code-snippets.js} +0 -0
- /package/dist/{groovy.tmLanguage.js → vscode-default-extensions/groovy/syntaxes/groovy.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration13.js → vscode-default-extensions/handlebars/language-configuration.json.js} +0 -0
- /package/dist/{Handlebars.tmLanguage.js → vscode-default-extensions/handlebars/syntaxes/Handlebars.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration14.js → vscode-default-extensions/hlsl/language-configuration.json.js} +0 -0
- /package/dist/{hlsl.tmLanguage.js → vscode-default-extensions/hlsl/syntaxes/hlsl.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration15.js → vscode-default-extensions/html/language-configuration.json.js} +0 -0
- /package/dist/{html.js → vscode-default-extensions/html/snippets/html.code-snippets.js} +0 -0
- /package/dist/{html-derivative.tmLanguage.js → vscode-default-extensions/html/syntaxes/html-derivative.tmLanguage.json.js} +0 -0
- /package/dist/{html.tmLanguage.js → vscode-default-extensions/html/syntaxes/html.tmLanguage.json.js} +0 -0
- /package/dist/{ini.language-configuration.js → vscode-default-extensions/ini/ini.language-configuration.json.js} +0 -0
- /package/dist/{properties.language-configuration.js → vscode-default-extensions/ini/properties.language-configuration.json.js} +0 -0
- /package/dist/{ini.tmLanguage.js → vscode-default-extensions/ini/syntaxes/ini.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration16.js → vscode-default-extensions/java/language-configuration.json.js} +0 -0
- /package/dist/{java.js → vscode-default-extensions/java/snippets/java.code-snippets.js} +0 -0
- /package/dist/{java.tmLanguage.js → vscode-default-extensions/java/syntaxes/java.tmLanguage.json.js} +0 -0
- /package/dist/{javascript-language-configuration.js → vscode-default-extensions/javascript/javascript-language-configuration.json.js} +0 -0
- /package/dist/{javascript.js → vscode-default-extensions/javascript/snippets/javascript.code-snippets.js} +0 -0
- /package/dist/{JavaScript.tmLanguage.js → vscode-default-extensions/javascript/syntaxes/JavaScript.tmLanguage.json.js} +0 -0
- /package/dist/{JavaScriptReact.tmLanguage.js → vscode-default-extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json.js} +0 -0
- /package/dist/{Regular Expressions (JavaScript).js → vscode-default-extensions/javascript/syntaxes/Regular Expressions (JavaScript).tmLanguage.js} +0 -0
- /package/dist/{tags-language-configuration.js → vscode-default-extensions/javascript/tags-language-configuration.json.js} +0 -0
- /package/dist/{language-configuration17.js → vscode-default-extensions/json/language-configuration.json.js} +0 -0
- /package/dist/{JSON.tmLanguage.js → vscode-default-extensions/json/syntaxes/JSON.tmLanguage.json.js} +0 -0
- /package/dist/{JSONC.tmLanguage.js → vscode-default-extensions/json/syntaxes/JSONC.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration18.js → vscode-default-extensions/julia/language-configuration.json.js} +0 -0
- /package/dist/{julia.tmLanguage.js → vscode-default-extensions/julia/syntaxes/julia.tmLanguage.json.js} +0 -0
- /package/dist/{latex-cpp-embedded-language-configuration.js → vscode-default-extensions/latex/latex-cpp-embedded-language-configuration.json.js} +0 -0
- /package/dist/{latex-language-configuration.js → vscode-default-extensions/latex/latex-language-configuration.json.js} +0 -0
- /package/dist/{markdown-latex-combined-language-configuration.js → vscode-default-extensions/latex/markdown-latex-combined-language-configuration.json.js} +0 -0
- /package/dist/{Bibtex.tmLanguage.js → vscode-default-extensions/latex/syntaxes/Bibtex.tmLanguage.json.js} +0 -0
- /package/dist/{LaTeX.tmLanguage.js → vscode-default-extensions/latex/syntaxes/LaTeX.tmLanguage.json.js} +0 -0
- /package/dist/{TeX.tmLanguage.js → vscode-default-extensions/latex/syntaxes/TeX.tmLanguage.json.js} +0 -0
- /package/dist/{cpp-grammar-bailout.tmLanguage.js → vscode-default-extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json.js} +0 -0
- /package/dist/{markdown-latex-combined.tmLanguage.js → vscode-default-extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration19.js → vscode-default-extensions/less/language-configuration.json.js} +0 -0
- /package/dist/{less.tmLanguage.js → vscode-default-extensions/less/syntaxes/less.tmLanguage.json.js} +0 -0
- /package/dist/{log.tmLanguage.js → vscode-default-extensions/log/syntaxes/log.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration20.js → vscode-default-extensions/lua/language-configuration.json.js} +0 -0
- /package/dist/{lua.tmLanguage.js → vscode-default-extensions/lua/syntaxes/lua.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration21.js → vscode-default-extensions/make/language-configuration.json.js} +0 -0
- /package/dist/{make.tmLanguage.js → vscode-default-extensions/make/syntaxes/make.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration22.js → vscode-default-extensions/markdown-basics/language-configuration.json.js} +0 -0
- /package/dist/{markdown.js → vscode-default-extensions/markdown-basics/snippets/markdown.code-snippets.js} +0 -0
- /package/dist/{markdown.tmLanguage.js → vscode-default-extensions/markdown-basics/syntaxes/markdown.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration23.js → vscode-default-extensions/objective-c/language-configuration.json.js} +0 -0
- /package/dist/{objective-c.tmLanguage.js → vscode-default-extensions/objective-c/syntaxes/objective-c.tmLanguage.json.js} +0 -0
- /package/dist/{objective-c__.tmLanguage.js → vscode-default-extensions/objective-c/syntaxes/objective-c__.tmLanguage.json.js} +0 -0
- /package/dist/{perl.language-configuration.js → vscode-default-extensions/perl/perl.language-configuration.json.js} +0 -0
- /package/dist/{perl6.language-configuration.js → vscode-default-extensions/perl/perl6.language-configuration.json.js} +0 -0
- /package/dist/{perl.tmLanguage.js → vscode-default-extensions/perl/syntaxes/perl.tmLanguage.json.js} +0 -0
- /package/dist/{perl6.tmLanguage.js → vscode-default-extensions/perl/syntaxes/perl6.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration24.js → vscode-default-extensions/php/language-configuration.json.js} +0 -0
- /package/dist/{php.js → vscode-default-extensions/php/snippets/php.code-snippets.js} +0 -0
- /package/dist/{html.tmLanguage2.js → vscode-default-extensions/php/syntaxes/html.tmLanguage.json.js} +0 -0
- /package/dist/{php.tmLanguage.js → vscode-default-extensions/php/syntaxes/php.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration25.js → vscode-default-extensions/powershell/language-configuration.json.js} +0 -0
- /package/dist/{powershell.tmLanguage.js → vscode-default-extensions/powershell/syntaxes/powershell.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration26.js → vscode-default-extensions/pug/language-configuration.json.js} +0 -0
- /package/dist/{pug.tmLanguage.js → vscode-default-extensions/pug/syntaxes/pug.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration27.js → vscode-default-extensions/python/language-configuration.json.js} +0 -0
- /package/dist/{MagicPython.tmLanguage.js → vscode-default-extensions/python/syntaxes/MagicPython.tmLanguage.json.js} +0 -0
- /package/dist/{MagicRegExp.tmLanguage.js → vscode-default-extensions/python/syntaxes/MagicRegExp.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration28.js → vscode-default-extensions/r/language-configuration.json.js} +0 -0
- /package/dist/{r.tmLanguage.js → vscode-default-extensions/r/syntaxes/r.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration29.js → vscode-default-extensions/razor/language-configuration.json.js} +0 -0
- /package/dist/{cshtml.tmLanguage.js → vscode-default-extensions/razor/syntaxes/cshtml.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration30.js → vscode-default-extensions/ruby/language-configuration.json.js} +0 -0
- /package/dist/{ruby.tmLanguage.js → vscode-default-extensions/ruby/syntaxes/ruby.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration31.js → vscode-default-extensions/rust/language-configuration.json.js} +0 -0
- /package/dist/{rust.tmLanguage.js → vscode-default-extensions/rust/syntaxes/rust.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration32.js → vscode-default-extensions/scss/language-configuration.json.js} +0 -0
- /package/dist/{sassdoc.tmLanguage.js → vscode-default-extensions/scss/syntaxes/sassdoc.tmLanguage.json.js} +0 -0
- /package/dist/{scss.tmLanguage.js → vscode-default-extensions/scss/syntaxes/scss.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration33.js → vscode-default-extensions/shaderlab/language-configuration.json.js} +0 -0
- /package/dist/{shaderlab.tmLanguage.js → vscode-default-extensions/shaderlab/syntaxes/shaderlab.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration34.js → vscode-default-extensions/shellscript/language-configuration.json.js} +0 -0
- /package/dist/{shell-unix-bash.tmLanguage.js → vscode-default-extensions/shellscript/syntaxes/shell-unix-bash.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration35.js → vscode-default-extensions/sql/language-configuration.json.js} +0 -0
- /package/dist/{sql.tmLanguage.js → vscode-default-extensions/sql/syntaxes/sql.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration36.js → vscode-default-extensions/swift/language-configuration.json.js} +0 -0
- /package/dist/{swift.js → vscode-default-extensions/swift/snippets/swift.code-snippets.js} +0 -0
- /package/dist/{swift.tmLanguage.js → vscode-default-extensions/swift/syntaxes/swift.tmLanguage.json.js} +0 -0
- /package/dist/{abyss-color-theme.js → vscode-default-extensions/theme-abyss/themes/abyss-color-theme.json.js} +0 -0
- /package/dist/{vs_minimal-icon-theme.js → vscode-default-extensions/theme-defaults/fileicons/vs_minimal-icon-theme.json.js} +0 -0
- /package/dist/{dark_plus.js → vscode-default-extensions/theme-defaults/themes/dark_plus.json.js} +0 -0
- /package/dist/{dark_plus_experimental.js → vscode-default-extensions/theme-defaults/themes/dark_plus_experimental.json.js} +0 -0
- /package/dist/{dark_vs.js → vscode-default-extensions/theme-defaults/themes/dark_vs.json.js} +0 -0
- /package/dist/{hc_black.js → vscode-default-extensions/theme-defaults/themes/hc_black.json.js} +0 -0
- /package/dist/{hc_light.js → vscode-default-extensions/theme-defaults/themes/hc_light.json.js} +0 -0
- /package/dist/{light_plus.js → vscode-default-extensions/theme-defaults/themes/light_plus.json.js} +0 -0
- /package/dist/{light_plus_experimental.js → vscode-default-extensions/theme-defaults/themes/light_plus_experimental.json.js} +0 -0
- /package/dist/{light_vs.js → vscode-default-extensions/theme-defaults/themes/light_vs.json.js} +0 -0
- /package/dist/{kimbie-dark-color-theme.js → vscode-default-extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json.js} +0 -0
- /package/dist/{monokai-color-theme.js → vscode-default-extensions/theme-monokai/themes/monokai-color-theme.json.js} +0 -0
- /package/dist/{dimmed-monokai-color-theme.js → vscode-default-extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json.js} +0 -0
- /package/dist/{quietlight-color-theme.js → vscode-default-extensions/theme-quietlight/themes/quietlight-color-theme.json.js} +0 -0
- /package/dist/{Red-color-theme.js → vscode-default-extensions/theme-red/themes/Red-color-theme.json.js} +0 -0
- /package/dist/{vs-seti-icon-theme.js → vscode-default-extensions/theme-seti/icons/vs-seti-icon-theme.json.js} +0 -0
- /package/dist/{solarized-dark-color-theme.js → vscode-default-extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json.js} +0 -0
- /package/dist/{solarized-light-color-theme.js → vscode-default-extensions/theme-solarized-light/themes/solarized-light-color-theme.json.js} +0 -0
- /package/dist/{tomorrow-night-blue-color-theme.js → vscode-default-extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json.js} +0 -0
- /package/dist/{language-configuration37.js → vscode-default-extensions/typescript-basics/language-configuration.json.js} +0 -0
- /package/dist/{typescript.js → vscode-default-extensions/typescript-basics/snippets/typescript.code-snippets.js} +0 -0
- /package/dist/{TypeScript.tmLanguage.js → vscode-default-extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json.js} +0 -0
- /package/dist/{TypeScriptReact.tmLanguage.js → vscode-default-extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json.js} +0 -0
- /package/dist/{jsdoc.js.injection.tmLanguage.js → vscode-default-extensions/typescript-basics/syntaxes/jsdoc.js.injection.tmLanguage.json.js} +0 -0
- /package/dist/{jsdoc.ts.injection.tmLanguage.js → vscode-default-extensions/typescript-basics/syntaxes/jsdoc.ts.injection.tmLanguage.json.js} +0 -0
- /package/dist/{language-configuration38.js → vscode-default-extensions/vb/language-configuration.json.js} +0 -0
- /package/dist/{vb.js → vscode-default-extensions/vb/snippets/vb.code-snippets.js} +0 -0
- /package/dist/{asp-vb-net.tmlanguage.js → vscode-default-extensions/vb/syntaxes/asp-vb-net.tmlanguage.json.js} +0 -0
- /package/dist/{xml.tmLanguage.js → vscode-default-extensions/xml/syntaxes/xml.tmLanguage.json.js} +0 -0
- /package/dist/{xsl.tmLanguage.js → vscode-default-extensions/xml/syntaxes/xsl.tmLanguage.json.js} +0 -0
- /package/dist/{xml.language-configuration.js → vscode-default-extensions/xml/xml.language-configuration.json.js} +0 -0
- /package/dist/{xsl.language-configuration.js → vscode-default-extensions/xml/xsl.language-configuration.json.js} +0 -0
- /package/dist/{language-configuration39.js → vscode-default-extensions/yaml/language-configuration.json.js} +0 -0
- /package/dist/{yaml.tmLanguage.js → vscode-default-extensions/yaml/syntaxes/yaml.tmLanguage.json.js} +0 -0
package/dist/notifications.js
DELETED
|
@@ -1,2302 +0,0 @@
|
|
|
1
|
-
import { n, __decorate, onRenderWorkbench, Emitter, NotificationsFilter, __param, NotificationPriority, IntervalCounter, NeverShowAgainScope, assertAllDefined, getServiceOverride as getServiceOverride$1, isErrorWithActions, IWorkbenchLayoutService, IEditorGroupsService, ILifecycleService, IHostService } from './polyfill.js';
|
|
2
|
-
import { NotificationsCenterVisibleContext, NotificationFocusedContext, NotificationsToastsVisibleContext, NOTIFICATIONS_BACKGROUND, NOTIFICATIONS_TOAST_BORDER, NOTIFICATIONS_CENTER_BORDER, NOTIFICATIONS_CENTER_HEADER_FOREGROUND, NOTIFICATIONS_CENTER_HEADER_BACKGROUND } from './theme2.js';
|
|
3
|
-
import { Disposable, toDisposable, DisposableStore, dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
|
-
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
5
|
-
import { NoOpNotification, Severity, INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
6
|
-
import { isCancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
7
|
-
import { toErrorMessage } from 'monaco-editor/esm/vs/base/common/errorMessage.js';
|
|
8
|
-
import { parseLinkedText } from 'monaco-editor/esm/vs/base/common/linkedText.js';
|
|
9
|
-
import { equals, firstOrDefault, isNonEmptyArray } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
10
|
-
import { ActionRunner, Action } from 'monaco-editor/esm/vs/base/common/actions.js';
|
|
11
|
-
import { hash } from 'monaco-editor/esm/vs/base/common/hash.js';
|
|
12
|
-
import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
|
|
13
|
-
import { CommandsRegistry, ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
14
|
-
import { KeybindingsRegistry } from 'monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js';
|
|
15
|
-
import { IListService, WorkbenchList } from 'monaco-editor/esm/vs/platform/list/browser/listService.js';
|
|
16
|
-
import { ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
17
|
-
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
18
|
-
import { MenuRegistry, MenuId } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
19
|
-
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
20
|
-
import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
|
|
21
|
-
import { IClipboardService } from 'monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js';
|
|
22
|
-
import { registerIcon } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
|
|
23
|
-
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
24
|
-
import { ButtonBar } from './button.js';
|
|
25
|
-
import { Dimension, getClientArea, addDisposableListener, EventType, EventHelper, clearNode, scheduleAtNextAnimationFrame, isAncestor, $, trackFocus, isEventLike } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
26
|
-
import { DomEmitter } from 'monaco-editor/esm/vs/base/browser/event.js';
|
|
27
|
-
import { Gesture, EventType as EventType$1 } from 'monaco-editor/esm/vs/base/browser/touch.js';
|
|
28
|
-
import { ActionBar } from 'monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js';
|
|
29
|
-
import { ProgressBar } from 'monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js';
|
|
30
|
-
import { defaultProgressBarStyles, defaultButtonStyles } from 'monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js';
|
|
31
|
-
import { IContextMenuService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
|
|
32
|
-
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
33
|
-
import { IOpenerService } from 'monaco-editor/esm/vs/platform/opener/common/opener.js';
|
|
34
|
-
import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/keybinding.js';
|
|
35
|
-
import { StandardKeyboardEvent } from 'monaco-editor/esm/vs/base/browser/keyboardEvent.js';
|
|
36
|
-
import { DropdownMenuActionViewItem } from 'monaco-editor/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js';
|
|
37
|
-
import { assertIsDefined } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
38
|
-
import { widgetShadow } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
39
|
-
import { Themable, IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
40
|
-
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
41
|
-
import { alert } from 'monaco-editor/esm/vs/base/browser/ui/aria/aria.js';
|
|
42
|
-
import { ILayoutService } from 'monaco-editor/esm/vs/platform/layout/browser/layoutService.js';
|
|
43
|
-
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
44
|
-
var css$3 = ".monaco-workbench>.notifications-toasts{bottom:26px;display:none;overflow:hidden;position:absolute;right:3px;z-index:1000}.monaco-workbench.nostatusbar>.notifications-toasts{bottom:3px}.monaco-workbench>.notifications-toasts.visible{display:flex;flex-direction:column}.monaco-workbench>.notifications-toasts .notification-toast-container{overflow:hidden}.monaco-workbench>.notifications-toasts .notification-toast-container>.notification-toast{border-radius:4px;margin:8px;opacity:0;transform:translate3d(0,100%,0);transition:transform .3s ease-out,opacity .3s ease-out}.monaco-workbench.reduce-motion>.notifications-toasts .notification-toast-container>.notification-toast{transition:transform 0ms ease-out,opacity 0ms ease-out}.monaco-workbench>.notifications-toasts .notification-toast-container>.notification-toast.notification-fade-in{opacity:1;transform:none}.monaco-workbench>.notifications-toasts .notification-toast-container>.notification-toast.notification-fade-in-done{opacity:1;transform:none;transition:none}.monaco-workbench>.notifications-toasts .codicon.codicon-error{color:var(--vscode-notificationsErrorIcon-foreground)!important}.monaco-workbench>.notifications-toasts .codicon.codicon-warning{color:var(--vscode-notificationsWarningIcon-foreground)!important}.monaco-workbench>.notifications-toasts .codicon.codicon-info{color:var(--vscode-notificationsInfoIcon-foreground)!important}";
|
|
45
|
-
n(css$3,{});
|
|
46
|
-
var css$2 = ".monaco-workbench .notifications-list-container{background:var(--vscode-notifications-background);border-radius:inherit;color:var(--vscode-notifications-foreground);outline-color:var(--vscode-contrastBorder)}.monaco-workbench .notifications-list-container .notification-list-item{border-radius:4px;box-sizing:border-box;display:flex;flex-direction:column;flex-direction:column-reverse;height:100%;padding:10px 5px}.monaco-workbench .notifications-list-container .notification-offset-helper{word-wrap:break-word;line-height:22px;opacity:0;position:absolute}.monaco-workbench .notifications-list-container .monaco-scrollable-element{border-radius:4px}.monaco-workbench .notifications-list-container .notification-list-item>.notification-list-item-main-row{display:flex;flex-grow:1}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-icon{align-items:center;background-position:50%;background-repeat:no-repeat;display:flex;flex:0 0 16px;font-size:18px;height:22px;margin-left:4px;margin-right:4px}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message{flex:1;line-height:22px;overflow:hidden;text-overflow:ellipsis;user-select:text;-webkit-user-select:text}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message a{color:var(--vscode-notificationLink-foreground)}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message a:focus{outline-color:var(--vscode-focusBorder);outline-style:solid;outline-width:1px}.monaco-workbench .notifications-list-container .notification-list-item.expanded .notification-list-item-message{word-wrap:break-word;white-space:normal}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-toolbar-container{display:none;height:22px}.monaco-workbench .notifications-list-container .monaco-list-row.focused .notification-list-item .notification-list-item-toolbar-container,.monaco-workbench .notifications-list-container .notification-list-item.expanded .notification-list-item-toolbar-container,.monaco-workbench .notifications-list-container .notification-list-item:hover .notification-list-item-toolbar-container{display:block}.monaco-workbench .notifications-list-container .notification-list-item>.notification-list-item-details-row{align-items:center;display:none;overflow:hidden;padding-left:5px}.monaco-workbench .notifications-list-container .notification-list-item.expanded>.notification-list-item-details-row{display:flex}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-source{flex:1;font-size:12px;overflow:hidden;text-overflow:ellipsis}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container{display:flex;overflow:hidden}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container>.monaco-button,.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container>.monaco-button-dropdown{margin:4px 5px}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-button{outline-offset:2px!important}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-text-button{display:inline-block;font-size:12px;overflow:hidden;padding:4px 10px;text-overflow:ellipsis;width:fit-content}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-dropdown-button{padding:5px}.monaco-workbench .notifications-list-container .progress-bit{bottom:0;height:2px}";
|
|
47
|
-
n(css$2,{});
|
|
48
|
-
class NotificationHandle extends Disposable {
|
|
49
|
-
constructor(item, onClose) {
|
|
50
|
-
super();
|
|
51
|
-
this.item = item;
|
|
52
|
-
this.onClose = onClose;
|
|
53
|
-
this._onDidClose = this._register(( (new Emitter())));
|
|
54
|
-
this.onDidClose = this._onDidClose.event;
|
|
55
|
-
this._onDidChangeVisibility = this._register(( (new Emitter())));
|
|
56
|
-
this.onDidChangeVisibility = this._onDidChangeVisibility.event;
|
|
57
|
-
this.registerListeners();
|
|
58
|
-
}
|
|
59
|
-
registerListeners() {
|
|
60
|
-
this._register(this.item.onDidChangeVisibility(visible => this._onDidChangeVisibility.fire(visible)));
|
|
61
|
-
Event.once(this.item.onDidClose)(() => {
|
|
62
|
-
this._onDidClose.fire();
|
|
63
|
-
this.dispose();
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
get progress() {
|
|
67
|
-
return this.item.progress;
|
|
68
|
-
}
|
|
69
|
-
updateSeverity(severity) {
|
|
70
|
-
this.item.updateSeverity(severity);
|
|
71
|
-
}
|
|
72
|
-
updateMessage(message) {
|
|
73
|
-
this.item.updateMessage(message);
|
|
74
|
-
}
|
|
75
|
-
updateActions(actions) {
|
|
76
|
-
this.item.updateActions(actions);
|
|
77
|
-
}
|
|
78
|
-
close() {
|
|
79
|
-
this.onClose(this.item);
|
|
80
|
-
this.dispose();
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
class NotificationsModel extends Disposable {
|
|
84
|
-
constructor() {
|
|
85
|
-
super(...arguments);
|
|
86
|
-
this._onDidChangeNotification = this._register(( (new Emitter())));
|
|
87
|
-
this.onDidChangeNotification = this._onDidChangeNotification.event;
|
|
88
|
-
this._onDidChangeStatusMessage = this._register(( (new Emitter())));
|
|
89
|
-
this.onDidChangeStatusMessage = this._onDidChangeStatusMessage.event;
|
|
90
|
-
this._onDidChangeFilter = this._register(( (new Emitter())));
|
|
91
|
-
this.onDidChangeFilter = this._onDidChangeFilter.event;
|
|
92
|
-
this._notifications = [];
|
|
93
|
-
this.filter = NotificationsFilter.OFF;
|
|
94
|
-
}
|
|
95
|
-
get notifications() { return this._notifications; }
|
|
96
|
-
get statusMessage() { return this._statusMessage; }
|
|
97
|
-
setFilter(filter) {
|
|
98
|
-
this.filter = filter;
|
|
99
|
-
this._onDidChangeFilter.fire(filter);
|
|
100
|
-
}
|
|
101
|
-
addNotification(notification) {
|
|
102
|
-
const item = this.createViewItem(notification);
|
|
103
|
-
if (!item) {
|
|
104
|
-
return NotificationsModel.NO_OP_NOTIFICATION;
|
|
105
|
-
}
|
|
106
|
-
const duplicate = this.findNotification(item);
|
|
107
|
-
duplicate?.close();
|
|
108
|
-
this._notifications.splice(0, 0, item);
|
|
109
|
-
this._onDidChangeNotification.fire({ item, index: 0, kind: 0 });
|
|
110
|
-
return (
|
|
111
|
-
(new NotificationHandle(item, item => this.onClose(item)))
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
onClose(item) {
|
|
115
|
-
const liveItem = this.findNotification(item);
|
|
116
|
-
if (liveItem && liveItem !== item) {
|
|
117
|
-
liveItem.close();
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
item.close();
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
findNotification(item) {
|
|
124
|
-
return this._notifications.find(notification => notification.equals(item));
|
|
125
|
-
}
|
|
126
|
-
createViewItem(notification) {
|
|
127
|
-
const item = NotificationViewItem.create(notification, this.filter);
|
|
128
|
-
if (!item) {
|
|
129
|
-
return undefined;
|
|
130
|
-
}
|
|
131
|
-
const fireNotificationChangeEvent = (kind, detail) => {
|
|
132
|
-
const index = this._notifications.indexOf(item);
|
|
133
|
-
if (index >= 0) {
|
|
134
|
-
this._onDidChangeNotification.fire({ item, index, kind, detail });
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
const itemExpansionChangeListener = item.onDidChangeExpansion(() => fireNotificationChangeEvent(2 ));
|
|
138
|
-
const itemContentChangeListener = item.onDidChangeContent(e => fireNotificationChangeEvent(1 , e.kind));
|
|
139
|
-
Event.once(item.onDidClose)(() => {
|
|
140
|
-
itemExpansionChangeListener.dispose();
|
|
141
|
-
itemContentChangeListener.dispose();
|
|
142
|
-
const index = this._notifications.indexOf(item);
|
|
143
|
-
if (index >= 0) {
|
|
144
|
-
this._notifications.splice(index, 1);
|
|
145
|
-
this._onDidChangeNotification.fire({ item, index, kind: 3 });
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
return item;
|
|
149
|
-
}
|
|
150
|
-
showStatusMessage(message, options) {
|
|
151
|
-
const item = StatusMessageViewItem.create(message, options);
|
|
152
|
-
if (!item) {
|
|
153
|
-
return Disposable.None;
|
|
154
|
-
}
|
|
155
|
-
this._statusMessage = item;
|
|
156
|
-
this._onDidChangeStatusMessage.fire({ kind: 0 , item });
|
|
157
|
-
return toDisposable(() => {
|
|
158
|
-
if (this._statusMessage === item) {
|
|
159
|
-
this._statusMessage = undefined;
|
|
160
|
-
this._onDidChangeStatusMessage.fire({ kind: 1 , item });
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
NotificationsModel.NO_OP_NOTIFICATION = ( (new NoOpNotification()));
|
|
166
|
-
function isNotificationViewItem(obj) {
|
|
167
|
-
return obj instanceof NotificationViewItem;
|
|
168
|
-
}
|
|
169
|
-
class NotificationViewItemProgress extends Disposable {
|
|
170
|
-
constructor() {
|
|
171
|
-
super();
|
|
172
|
-
this._onDidChange = this._register(( (new Emitter())));
|
|
173
|
-
this.onDidChange = this._onDidChange.event;
|
|
174
|
-
this._state = Object.create(null);
|
|
175
|
-
}
|
|
176
|
-
get state() {
|
|
177
|
-
return this._state;
|
|
178
|
-
}
|
|
179
|
-
infinite() {
|
|
180
|
-
if (this._state.infinite) {
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
this._state.infinite = true;
|
|
184
|
-
this._state.total = undefined;
|
|
185
|
-
this._state.worked = undefined;
|
|
186
|
-
this._state.done = undefined;
|
|
187
|
-
this._onDidChange.fire();
|
|
188
|
-
}
|
|
189
|
-
done() {
|
|
190
|
-
if (this._state.done) {
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
this._state.done = true;
|
|
194
|
-
this._state.infinite = undefined;
|
|
195
|
-
this._state.total = undefined;
|
|
196
|
-
this._state.worked = undefined;
|
|
197
|
-
this._onDidChange.fire();
|
|
198
|
-
}
|
|
199
|
-
total(value) {
|
|
200
|
-
if (this._state.total === value) {
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
this._state.total = value;
|
|
204
|
-
this._state.infinite = undefined;
|
|
205
|
-
this._state.done = undefined;
|
|
206
|
-
this._onDidChange.fire();
|
|
207
|
-
}
|
|
208
|
-
worked(value) {
|
|
209
|
-
if (typeof this._state.worked === 'number') {
|
|
210
|
-
this._state.worked += value;
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
213
|
-
this._state.worked = value;
|
|
214
|
-
}
|
|
215
|
-
this._state.infinite = undefined;
|
|
216
|
-
this._state.done = undefined;
|
|
217
|
-
this._onDidChange.fire();
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
class NotificationViewItem extends Disposable {
|
|
221
|
-
static create(notification, filter = NotificationsFilter.OFF) {
|
|
222
|
-
if (!notification || !notification.message || isCancellationError(notification.message)) {
|
|
223
|
-
return undefined;
|
|
224
|
-
}
|
|
225
|
-
let severity;
|
|
226
|
-
if (typeof notification.severity === 'number') {
|
|
227
|
-
severity = notification.severity;
|
|
228
|
-
}
|
|
229
|
-
else {
|
|
230
|
-
severity = Severity.Info;
|
|
231
|
-
}
|
|
232
|
-
const message = NotificationViewItem.parseNotificationMessage(notification.message);
|
|
233
|
-
if (!message) {
|
|
234
|
-
return undefined;
|
|
235
|
-
}
|
|
236
|
-
let actions;
|
|
237
|
-
if (notification.actions) {
|
|
238
|
-
actions = notification.actions;
|
|
239
|
-
}
|
|
240
|
-
else if (isErrorWithActions(notification.message)) {
|
|
241
|
-
actions = { primary: notification.message.actions };
|
|
242
|
-
}
|
|
243
|
-
let priority = notification.priority ?? NotificationPriority.DEFAULT;
|
|
244
|
-
if (priority === NotificationPriority.DEFAULT && (filter === NotificationsFilter.SILENT || (filter === NotificationsFilter.ERROR && notification.severity !== Severity.Error))) {
|
|
245
|
-
priority = NotificationPriority.SILENT;
|
|
246
|
-
}
|
|
247
|
-
return (
|
|
248
|
-
(new NotificationViewItem(
|
|
249
|
-
notification.id,
|
|
250
|
-
severity,
|
|
251
|
-
notification.sticky,
|
|
252
|
-
priority,
|
|
253
|
-
message,
|
|
254
|
-
notification.source,
|
|
255
|
-
notification.progress,
|
|
256
|
-
actions
|
|
257
|
-
))
|
|
258
|
-
);
|
|
259
|
-
}
|
|
260
|
-
static parseNotificationMessage(input) {
|
|
261
|
-
let message;
|
|
262
|
-
if (input instanceof Error) {
|
|
263
|
-
message = toErrorMessage(input, false);
|
|
264
|
-
}
|
|
265
|
-
else if (typeof input === 'string') {
|
|
266
|
-
message = input;
|
|
267
|
-
}
|
|
268
|
-
if (!message) {
|
|
269
|
-
return undefined;
|
|
270
|
-
}
|
|
271
|
-
const raw = message;
|
|
272
|
-
if (message.length > NotificationViewItem.MAX_MESSAGE_LENGTH) {
|
|
273
|
-
message = `${message.substr(0, NotificationViewItem.MAX_MESSAGE_LENGTH)}...`;
|
|
274
|
-
}
|
|
275
|
-
message = message.replace(/(\r\n|\n|\r)/gm, ' ').trim();
|
|
276
|
-
const linkedText = parseLinkedText(message);
|
|
277
|
-
return { raw, linkedText, original: input };
|
|
278
|
-
}
|
|
279
|
-
constructor(id, _severity, _sticky, _priority, _message, _source, progress, actions) {
|
|
280
|
-
super();
|
|
281
|
-
this.id = id;
|
|
282
|
-
this._severity = _severity;
|
|
283
|
-
this._sticky = _sticky;
|
|
284
|
-
this._priority = _priority;
|
|
285
|
-
this._message = _message;
|
|
286
|
-
this._source = _source;
|
|
287
|
-
this._visible = false;
|
|
288
|
-
this._onDidChangeExpansion = this._register(( (new Emitter())));
|
|
289
|
-
this.onDidChangeExpansion = this._onDidChangeExpansion.event;
|
|
290
|
-
this._onDidClose = this._register(( (new Emitter())));
|
|
291
|
-
this.onDidClose = this._onDidClose.event;
|
|
292
|
-
this._onDidChangeContent = this._register(( (new Emitter())));
|
|
293
|
-
this.onDidChangeContent = this._onDidChangeContent.event;
|
|
294
|
-
this._onDidChangeVisibility = this._register(( (new Emitter())));
|
|
295
|
-
this.onDidChangeVisibility = this._onDidChangeVisibility.event;
|
|
296
|
-
if (progress) {
|
|
297
|
-
this.setProgress(progress);
|
|
298
|
-
}
|
|
299
|
-
this.setActions(actions);
|
|
300
|
-
}
|
|
301
|
-
setProgress(progress) {
|
|
302
|
-
if (progress.infinite) {
|
|
303
|
-
this.progress.infinite();
|
|
304
|
-
}
|
|
305
|
-
else if (progress.total) {
|
|
306
|
-
this.progress.total(progress.total);
|
|
307
|
-
if (progress.worked) {
|
|
308
|
-
this.progress.worked(progress.worked);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
setActions(actions = { primary: [], secondary: [] }) {
|
|
313
|
-
this._actions = {
|
|
314
|
-
primary: Array.isArray(actions.primary) ? actions.primary : [],
|
|
315
|
-
secondary: Array.isArray(actions.secondary) ? actions.secondary : []
|
|
316
|
-
};
|
|
317
|
-
this._expanded = actions.primary && actions.primary.length > 0;
|
|
318
|
-
}
|
|
319
|
-
get canCollapse() {
|
|
320
|
-
return !this.hasActions;
|
|
321
|
-
}
|
|
322
|
-
get expanded() {
|
|
323
|
-
return !!this._expanded;
|
|
324
|
-
}
|
|
325
|
-
get severity() {
|
|
326
|
-
return this._severity;
|
|
327
|
-
}
|
|
328
|
-
get sticky() {
|
|
329
|
-
if (this._sticky) {
|
|
330
|
-
return true;
|
|
331
|
-
}
|
|
332
|
-
const hasActions = this.hasActions;
|
|
333
|
-
if ((hasActions && this._severity === Severity.Error) ||
|
|
334
|
-
(!hasActions && this._expanded) ||
|
|
335
|
-
(this._progress && !this._progress.state.done)
|
|
336
|
-
) {
|
|
337
|
-
return true;
|
|
338
|
-
}
|
|
339
|
-
return false;
|
|
340
|
-
}
|
|
341
|
-
get priority() {
|
|
342
|
-
return this._priority;
|
|
343
|
-
}
|
|
344
|
-
get hasActions() {
|
|
345
|
-
if (!this._actions) {
|
|
346
|
-
return false;
|
|
347
|
-
}
|
|
348
|
-
if (!this._actions.primary) {
|
|
349
|
-
return false;
|
|
350
|
-
}
|
|
351
|
-
return this._actions.primary.length > 0;
|
|
352
|
-
}
|
|
353
|
-
get hasProgress() {
|
|
354
|
-
return !!this._progress;
|
|
355
|
-
}
|
|
356
|
-
get progress() {
|
|
357
|
-
if (!this._progress) {
|
|
358
|
-
this._progress = this._register(( (new NotificationViewItemProgress())));
|
|
359
|
-
this._register(this._progress.onDidChange(() => this._onDidChangeContent.fire({ kind: 3 })));
|
|
360
|
-
}
|
|
361
|
-
return this._progress;
|
|
362
|
-
}
|
|
363
|
-
get message() {
|
|
364
|
-
return this._message;
|
|
365
|
-
}
|
|
366
|
-
get source() {
|
|
367
|
-
return typeof this._source === 'string' ? this._source : (this._source ? this._source.label : undefined);
|
|
368
|
-
}
|
|
369
|
-
get sourceId() {
|
|
370
|
-
return (this._source && typeof this._source !== 'string' && 'id' in this._source) ? this._source.id : undefined;
|
|
371
|
-
}
|
|
372
|
-
get actions() {
|
|
373
|
-
return this._actions;
|
|
374
|
-
}
|
|
375
|
-
get visible() {
|
|
376
|
-
return this._visible;
|
|
377
|
-
}
|
|
378
|
-
updateSeverity(severity) {
|
|
379
|
-
if (severity === this._severity) {
|
|
380
|
-
return;
|
|
381
|
-
}
|
|
382
|
-
this._severity = severity;
|
|
383
|
-
this._onDidChangeContent.fire({ kind: 0 });
|
|
384
|
-
}
|
|
385
|
-
updateMessage(input) {
|
|
386
|
-
const message = NotificationViewItem.parseNotificationMessage(input);
|
|
387
|
-
if (!message || message.raw === this._message.raw) {
|
|
388
|
-
return;
|
|
389
|
-
}
|
|
390
|
-
this._message = message;
|
|
391
|
-
this._onDidChangeContent.fire({ kind: 1 });
|
|
392
|
-
}
|
|
393
|
-
updateActions(actions) {
|
|
394
|
-
this.setActions(actions);
|
|
395
|
-
this._onDidChangeContent.fire({ kind: 2 });
|
|
396
|
-
}
|
|
397
|
-
updateVisibility(visible) {
|
|
398
|
-
if (this._visible !== visible) {
|
|
399
|
-
this._visible = visible;
|
|
400
|
-
this._onDidChangeVisibility.fire(visible);
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
expand() {
|
|
404
|
-
if (this._expanded || !this.canCollapse) {
|
|
405
|
-
return;
|
|
406
|
-
}
|
|
407
|
-
this._expanded = true;
|
|
408
|
-
this._onDidChangeExpansion.fire();
|
|
409
|
-
}
|
|
410
|
-
collapse(skipEvents) {
|
|
411
|
-
if (!this._expanded || !this.canCollapse) {
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
414
|
-
this._expanded = false;
|
|
415
|
-
if (!skipEvents) {
|
|
416
|
-
this._onDidChangeExpansion.fire();
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
toggle() {
|
|
420
|
-
if (this._expanded) {
|
|
421
|
-
this.collapse();
|
|
422
|
-
}
|
|
423
|
-
else {
|
|
424
|
-
this.expand();
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
close() {
|
|
428
|
-
this._onDidClose.fire();
|
|
429
|
-
this.dispose();
|
|
430
|
-
}
|
|
431
|
-
equals(other) {
|
|
432
|
-
if (this.hasProgress || other.hasProgress) {
|
|
433
|
-
return false;
|
|
434
|
-
}
|
|
435
|
-
if (typeof this.id === 'string' || typeof other.id === 'string') {
|
|
436
|
-
return this.id === other.id;
|
|
437
|
-
}
|
|
438
|
-
if (typeof this._source === 'object') {
|
|
439
|
-
if (this._source.label !== other.source || this._source.id !== other.sourceId) {
|
|
440
|
-
return false;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
else if (this._source !== other.source) {
|
|
444
|
-
return false;
|
|
445
|
-
}
|
|
446
|
-
if (this._message.raw !== other.message.raw) {
|
|
447
|
-
return false;
|
|
448
|
-
}
|
|
449
|
-
const primaryActions = (this._actions && this._actions.primary) || [];
|
|
450
|
-
const otherPrimaryActions = (other.actions && other.actions.primary) || [];
|
|
451
|
-
return equals(primaryActions, otherPrimaryActions, (action, otherAction) => (action.id + action.label) === (otherAction.id + otherAction.label));
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
NotificationViewItem.MAX_MESSAGE_LENGTH = 1000;
|
|
455
|
-
class ChoiceAction extends Action {
|
|
456
|
-
constructor(id, choice) {
|
|
457
|
-
super(id, choice.label, undefined, true, async () => {
|
|
458
|
-
choice.run();
|
|
459
|
-
this._onDidRun.fire();
|
|
460
|
-
});
|
|
461
|
-
this._onDidRun = this._register(( (new Emitter())));
|
|
462
|
-
this.onDidRun = this._onDidRun.event;
|
|
463
|
-
this._keepOpen = !!choice.keepOpen;
|
|
464
|
-
this._menu = !choice.isSecondary && choice.menu ? ( (choice.menu.map((c, index) => ( (new ChoiceAction(`${id}.${index}`, c)))))) : undefined;
|
|
465
|
-
}
|
|
466
|
-
get menu() {
|
|
467
|
-
return this._menu;
|
|
468
|
-
}
|
|
469
|
-
get keepOpen() {
|
|
470
|
-
return this._keepOpen;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
class StatusMessageViewItem {
|
|
474
|
-
static create(notification, options) {
|
|
475
|
-
if (!notification || isCancellationError(notification)) {
|
|
476
|
-
return undefined;
|
|
477
|
-
}
|
|
478
|
-
let message;
|
|
479
|
-
if (notification instanceof Error) {
|
|
480
|
-
message = toErrorMessage(notification, false);
|
|
481
|
-
}
|
|
482
|
-
else if (typeof notification === 'string') {
|
|
483
|
-
message = notification;
|
|
484
|
-
}
|
|
485
|
-
if (!message) {
|
|
486
|
-
return undefined;
|
|
487
|
-
}
|
|
488
|
-
return { message, options };
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
var css$1 = ".monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-toolbar-container .action-item,.monaco-workbench>.notifications-center>.notifications-center-header>.notifications-center-header-toolbar .action-item{margin-right:4px}.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-toolbar-container .action-item:first-child,.monaco-workbench>.notifications-center>.notifications-center-header>.notifications-center-header-toolbar .action-item:first-child{margin-left:4px}";
|
|
492
|
-
n(css$1,{});
|
|
493
|
-
function notificationToMetrics(message, source, silent) {
|
|
494
|
-
return {
|
|
495
|
-
id: ( (hash(( (message.toString()))).toString())),
|
|
496
|
-
silent,
|
|
497
|
-
source: source || 'core'
|
|
498
|
-
};
|
|
499
|
-
}
|
|
500
|
-
let NotificationsTelemetry = class NotificationsTelemetry extends Disposable {
|
|
501
|
-
constructor(telemetryService, notificationService) {
|
|
502
|
-
super();
|
|
503
|
-
this.telemetryService = telemetryService;
|
|
504
|
-
this.notificationService = notificationService;
|
|
505
|
-
this.registerListeners();
|
|
506
|
-
}
|
|
507
|
-
registerListeners() {
|
|
508
|
-
this._register(this.notificationService.onDidAddNotification(notification => {
|
|
509
|
-
const source = notification.source && typeof notification.source !== 'string' ? notification.source.id : notification.source;
|
|
510
|
-
this.telemetryService.publicLog2('notification:show', notificationToMetrics(notification.message, source, notification.priority === NotificationPriority.SILENT));
|
|
511
|
-
}));
|
|
512
|
-
this._register(this.notificationService.onDidRemoveNotification(notification => {
|
|
513
|
-
const source = notification.source && typeof notification.source !== 'string' ? notification.source.id : notification.source;
|
|
514
|
-
this.telemetryService.publicLog2('notification:close', notificationToMetrics(notification.message, source, notification.priority === NotificationPriority.SILENT));
|
|
515
|
-
}));
|
|
516
|
-
}
|
|
517
|
-
};
|
|
518
|
-
NotificationsTelemetry = ( (__decorate([
|
|
519
|
-
( (__param(0, ITelemetryService))),
|
|
520
|
-
( (__param(1, INotificationService)))
|
|
521
|
-
], NotificationsTelemetry)));
|
|
522
|
-
const SHOW_NOTIFICATIONS_CENTER = 'notifications.showList';
|
|
523
|
-
const HIDE_NOTIFICATIONS_CENTER = 'notifications.hideList';
|
|
524
|
-
const TOGGLE_NOTIFICATIONS_CENTER = 'notifications.toggleList';
|
|
525
|
-
const HIDE_NOTIFICATION_TOAST = 'notifications.hideToasts';
|
|
526
|
-
const FOCUS_NOTIFICATION_TOAST = 'notifications.focusToasts';
|
|
527
|
-
const FOCUS_NEXT_NOTIFICATION_TOAST = 'notifications.focusNextToast';
|
|
528
|
-
const FOCUS_PREVIOUS_NOTIFICATION_TOAST = 'notifications.focusPreviousToast';
|
|
529
|
-
const FOCUS_FIRST_NOTIFICATION_TOAST = 'notifications.focusFirstToast';
|
|
530
|
-
const FOCUS_LAST_NOTIFICATION_TOAST = 'notifications.focusLastToast';
|
|
531
|
-
const COLLAPSE_NOTIFICATION = 'notification.collapse';
|
|
532
|
-
const EXPAND_NOTIFICATION = 'notification.expand';
|
|
533
|
-
const ACCEPT_PRIMARY_ACTION_NOTIFICATION = 'notification.acceptPrimaryAction';
|
|
534
|
-
const TOGGLE_NOTIFICATION = 'notification.toggle';
|
|
535
|
-
const CLEAR_NOTIFICATION = 'notification.clear';
|
|
536
|
-
const CLEAR_ALL_NOTIFICATIONS = 'notifications.clearAll';
|
|
537
|
-
const TOGGLE_DO_NOT_DISTURB_MODE = 'notifications.toggleDoNotDisturbMode';
|
|
538
|
-
function registerNotificationCommands(center, toasts, model) {
|
|
539
|
-
function getNotificationFromContext(listService, context) {
|
|
540
|
-
if (isNotificationViewItem(context)) {
|
|
541
|
-
return context;
|
|
542
|
-
}
|
|
543
|
-
const list = listService.lastFocusedList;
|
|
544
|
-
if (list instanceof WorkbenchList) {
|
|
545
|
-
const focusedElement = list.getFocusedElements()[0];
|
|
546
|
-
if (isNotificationViewItem(focusedElement)) {
|
|
547
|
-
return focusedElement;
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
return undefined;
|
|
551
|
-
}
|
|
552
|
-
CommandsRegistry.registerCommand(SHOW_NOTIFICATIONS_CENTER, () => {
|
|
553
|
-
toasts.hide();
|
|
554
|
-
center.show();
|
|
555
|
-
});
|
|
556
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
557
|
-
id: HIDE_NOTIFICATIONS_CENTER,
|
|
558
|
-
weight: 200 + 50,
|
|
559
|
-
when: NotificationsCenterVisibleContext,
|
|
560
|
-
primary: 9 ,
|
|
561
|
-
handler: accessor => {
|
|
562
|
-
const telemetryService = accessor.get(ITelemetryService);
|
|
563
|
-
for (const notification of model.notifications) {
|
|
564
|
-
if (notification.visible) {
|
|
565
|
-
telemetryService.publicLog2('notification:hide', notificationToMetrics(notification.message.original, notification.sourceId, notification.priority === NotificationPriority.SILENT));
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
center.hide();
|
|
569
|
-
}
|
|
570
|
-
});
|
|
571
|
-
CommandsRegistry.registerCommand(TOGGLE_NOTIFICATIONS_CENTER, accessor => {
|
|
572
|
-
if (center.isVisible) {
|
|
573
|
-
center.hide();
|
|
574
|
-
}
|
|
575
|
-
else {
|
|
576
|
-
toasts.hide();
|
|
577
|
-
center.show();
|
|
578
|
-
}
|
|
579
|
-
});
|
|
580
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
581
|
-
id: CLEAR_NOTIFICATION,
|
|
582
|
-
weight: 200 ,
|
|
583
|
-
when: NotificationFocusedContext,
|
|
584
|
-
primary: 20 ,
|
|
585
|
-
mac: {
|
|
586
|
-
primary: 2048 | 1
|
|
587
|
-
},
|
|
588
|
-
handler: (accessor, args) => {
|
|
589
|
-
const notification = getNotificationFromContext(accessor.get(IListService), args);
|
|
590
|
-
if (notification && !notification.hasProgress) {
|
|
591
|
-
notification.close();
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
});
|
|
595
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
596
|
-
id: EXPAND_NOTIFICATION,
|
|
597
|
-
weight: 200 ,
|
|
598
|
-
when: NotificationFocusedContext,
|
|
599
|
-
primary: 17 ,
|
|
600
|
-
handler: (accessor, args) => {
|
|
601
|
-
const notification = getNotificationFromContext(accessor.get(IListService), args);
|
|
602
|
-
notification?.expand();
|
|
603
|
-
}
|
|
604
|
-
});
|
|
605
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
606
|
-
id: ACCEPT_PRIMARY_ACTION_NOTIFICATION,
|
|
607
|
-
weight: 200 ,
|
|
608
|
-
when: ( (ContextKeyExpr.and(NotificationsToastsVisibleContext))),
|
|
609
|
-
primary: 2048 | 1024 | 31 ,
|
|
610
|
-
handler: (accessor) => {
|
|
611
|
-
const actionRunner = accessor.get(IInstantiationService).createInstance(NotificationActionRunner);
|
|
612
|
-
const notification = firstOrDefault(model.notifications);
|
|
613
|
-
if (!notification) {
|
|
614
|
-
return;
|
|
615
|
-
}
|
|
616
|
-
const primaryAction = notification.actions?.primary ? firstOrDefault(notification.actions.primary) : undefined;
|
|
617
|
-
if (!primaryAction) {
|
|
618
|
-
return;
|
|
619
|
-
}
|
|
620
|
-
actionRunner.run(primaryAction, notification);
|
|
621
|
-
notification.close();
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
625
|
-
id: COLLAPSE_NOTIFICATION,
|
|
626
|
-
weight: 200 ,
|
|
627
|
-
when: NotificationFocusedContext,
|
|
628
|
-
primary: 15 ,
|
|
629
|
-
handler: (accessor, args) => {
|
|
630
|
-
const notification = getNotificationFromContext(accessor.get(IListService), args);
|
|
631
|
-
notification?.collapse();
|
|
632
|
-
}
|
|
633
|
-
});
|
|
634
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
635
|
-
id: TOGGLE_NOTIFICATION,
|
|
636
|
-
weight: 200 ,
|
|
637
|
-
when: NotificationFocusedContext,
|
|
638
|
-
primary: 10 ,
|
|
639
|
-
secondary: [3 ],
|
|
640
|
-
handler: accessor => {
|
|
641
|
-
const notification = getNotificationFromContext(accessor.get(IListService));
|
|
642
|
-
notification?.toggle();
|
|
643
|
-
}
|
|
644
|
-
});
|
|
645
|
-
CommandsRegistry.registerCommand(HIDE_NOTIFICATION_TOAST, accessor => {
|
|
646
|
-
const telemetryService = accessor.get(ITelemetryService);
|
|
647
|
-
for (const notification of model.notifications) {
|
|
648
|
-
if (notification.visible) {
|
|
649
|
-
telemetryService.publicLog2('notification:hide', notificationToMetrics(notification.message.original, notification.sourceId, notification.priority === NotificationPriority.SILENT));
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
toasts.hide();
|
|
653
|
-
});
|
|
654
|
-
KeybindingsRegistry.registerKeybindingRule({
|
|
655
|
-
id: HIDE_NOTIFICATION_TOAST,
|
|
656
|
-
weight: 200 - 50,
|
|
657
|
-
when: NotificationsToastsVisibleContext,
|
|
658
|
-
primary: 9
|
|
659
|
-
});
|
|
660
|
-
KeybindingsRegistry.registerKeybindingRule({
|
|
661
|
-
id: HIDE_NOTIFICATION_TOAST,
|
|
662
|
-
weight: 200 + 100,
|
|
663
|
-
when: ( (ContextKeyExpr.and(NotificationsToastsVisibleContext, NotificationFocusedContext))),
|
|
664
|
-
primary: 9
|
|
665
|
-
});
|
|
666
|
-
CommandsRegistry.registerCommand(FOCUS_NOTIFICATION_TOAST, () => toasts.focus());
|
|
667
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
668
|
-
id: FOCUS_NEXT_NOTIFICATION_TOAST,
|
|
669
|
-
weight: 200 ,
|
|
670
|
-
when: ( (ContextKeyExpr.and(NotificationFocusedContext, NotificationsToastsVisibleContext))),
|
|
671
|
-
primary: 18 ,
|
|
672
|
-
handler: () => {
|
|
673
|
-
toasts.focusNext();
|
|
674
|
-
}
|
|
675
|
-
});
|
|
676
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
677
|
-
id: FOCUS_PREVIOUS_NOTIFICATION_TOAST,
|
|
678
|
-
weight: 200 ,
|
|
679
|
-
when: ( (ContextKeyExpr.and(NotificationFocusedContext, NotificationsToastsVisibleContext))),
|
|
680
|
-
primary: 16 ,
|
|
681
|
-
handler: () => {
|
|
682
|
-
toasts.focusPrevious();
|
|
683
|
-
}
|
|
684
|
-
});
|
|
685
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
686
|
-
id: FOCUS_FIRST_NOTIFICATION_TOAST,
|
|
687
|
-
weight: 200 ,
|
|
688
|
-
when: ( (ContextKeyExpr.and(NotificationFocusedContext, NotificationsToastsVisibleContext))),
|
|
689
|
-
primary: 11 ,
|
|
690
|
-
secondary: [14 ],
|
|
691
|
-
handler: () => {
|
|
692
|
-
toasts.focusFirst();
|
|
693
|
-
}
|
|
694
|
-
});
|
|
695
|
-
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
696
|
-
id: FOCUS_LAST_NOTIFICATION_TOAST,
|
|
697
|
-
weight: 200 ,
|
|
698
|
-
when: ( (ContextKeyExpr.and(NotificationFocusedContext, NotificationsToastsVisibleContext))),
|
|
699
|
-
primary: 12 ,
|
|
700
|
-
secondary: [13 ],
|
|
701
|
-
handler: () => {
|
|
702
|
-
toasts.focusLast();
|
|
703
|
-
}
|
|
704
|
-
});
|
|
705
|
-
CommandsRegistry.registerCommand(CLEAR_ALL_NOTIFICATIONS, () => center.clearAll());
|
|
706
|
-
CommandsRegistry.registerCommand(TOGGLE_DO_NOT_DISTURB_MODE, accessor => {
|
|
707
|
-
const notificationService = accessor.get(INotificationService);
|
|
708
|
-
notificationService.doNotDisturbMode = !notificationService.doNotDisturbMode;
|
|
709
|
-
});
|
|
710
|
-
const category = { value: ( (localize('notifications', "Notifications"))), original: 'Notifications' };
|
|
711
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: SHOW_NOTIFICATIONS_CENTER, title: { value: ( (localize('showNotifications', "Show Notifications"))), original: 'Show Notifications' }, category } });
|
|
712
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: HIDE_NOTIFICATIONS_CENTER, title: { value: ( (localize('hideNotifications', "Hide Notifications"))), original: 'Hide Notifications' }, category }, when: NotificationsCenterVisibleContext });
|
|
713
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLEAR_ALL_NOTIFICATIONS, title: { value: ( (localize('clearAllNotifications', "Clear All Notifications"))), original: 'Clear All Notifications' }, category } });
|
|
714
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: ACCEPT_PRIMARY_ACTION_NOTIFICATION, title: { value: ( (localize('acceptNotificationPrimaryAction', "Accept Notification Primary Action"))), original: 'Accept Notification Primary Action' }, category } });
|
|
715
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: TOGGLE_DO_NOT_DISTURB_MODE, title: { value: ( (localize('toggleDoNotDisturbMode', "Toggle Do Not Disturb Mode"))), original: 'Toggle Do Not Disturb Mode' }, category } });
|
|
716
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: FOCUS_NOTIFICATION_TOAST, title: { value: ( (localize('focusNotificationToasts', "Focus Notification Toast"))), original: 'Focus Notification Toast' }, category }, when: NotificationsToastsVisibleContext });
|
|
717
|
-
}
|
|
718
|
-
let NotificationActionRunner = class NotificationActionRunner extends ActionRunner {
|
|
719
|
-
constructor(telemetryService, notificationService) {
|
|
720
|
-
super();
|
|
721
|
-
this.telemetryService = telemetryService;
|
|
722
|
-
this.notificationService = notificationService;
|
|
723
|
-
}
|
|
724
|
-
async runAction(action, context) {
|
|
725
|
-
this.telemetryService.publicLog2('workbenchActionExecuted', { id: action.id, from: 'message' });
|
|
726
|
-
if (isNotificationViewItem(context)) {
|
|
727
|
-
this.telemetryService.publicLog2('notification:actionExecuted', {
|
|
728
|
-
id: ( (hash(( (context.message.original.toString()))).toString())),
|
|
729
|
-
actionLabel: action.label,
|
|
730
|
-
source: context.sourceId || 'core',
|
|
731
|
-
silent: context.priority === NotificationPriority.SILENT
|
|
732
|
-
});
|
|
733
|
-
}
|
|
734
|
-
try {
|
|
735
|
-
await super.runAction(action, context);
|
|
736
|
-
}
|
|
737
|
-
catch (error) {
|
|
738
|
-
this.notificationService.error(error);
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
};
|
|
742
|
-
NotificationActionRunner = ( (__decorate([
|
|
743
|
-
( (__param(0, ITelemetryService))),
|
|
744
|
-
( (__param(1, INotificationService)))
|
|
745
|
-
], NotificationActionRunner)));
|
|
746
|
-
const clearIcon = ( (registerIcon(
|
|
747
|
-
'notifications-clear',
|
|
748
|
-
Codicon.close,
|
|
749
|
-
(localize('clearIcon', 'Icon for the clear action in notifications.'))
|
|
750
|
-
)));
|
|
751
|
-
const clearAllIcon = ( (registerIcon(
|
|
752
|
-
'notifications-clear-all',
|
|
753
|
-
Codicon.clearAll,
|
|
754
|
-
(localize('clearAllIcon', 'Icon for the clear all action in notifications.'))
|
|
755
|
-
)));
|
|
756
|
-
const hideIcon = ( (registerIcon(
|
|
757
|
-
'notifications-hide',
|
|
758
|
-
Codicon.chevronDown,
|
|
759
|
-
(localize('hideIcon', 'Icon for the hide action in notifications.'))
|
|
760
|
-
)));
|
|
761
|
-
const expandIcon = ( (registerIcon(
|
|
762
|
-
'notifications-expand',
|
|
763
|
-
Codicon.chevronUp,
|
|
764
|
-
(localize('expandIcon', 'Icon for the expand action in notifications.'))
|
|
765
|
-
)));
|
|
766
|
-
const collapseIcon = ( (registerIcon(
|
|
767
|
-
'notifications-collapse',
|
|
768
|
-
Codicon.chevronDown,
|
|
769
|
-
(localize('collapseIcon', 'Icon for the collapse action in notifications.'))
|
|
770
|
-
)));
|
|
771
|
-
const configureIcon = ( (registerIcon(
|
|
772
|
-
'notifications-configure',
|
|
773
|
-
Codicon.gear,
|
|
774
|
-
(localize('configureIcon', 'Icon for the configure action in notifications.'))
|
|
775
|
-
)));
|
|
776
|
-
const doNotDisturbIcon = ( (registerIcon(
|
|
777
|
-
'notifications-do-not-disturb',
|
|
778
|
-
Codicon.bellSlash,
|
|
779
|
-
(localize('doNotDisturbIcon', 'Icon for the mute all action in notifications.'))
|
|
780
|
-
)));
|
|
781
|
-
let ClearNotificationAction = class ClearNotificationAction extends Action {
|
|
782
|
-
constructor(id, label, commandService) {
|
|
783
|
-
super(id, label, ThemeIcon.asClassName(clearIcon));
|
|
784
|
-
this.commandService = commandService;
|
|
785
|
-
}
|
|
786
|
-
async run(notification) {
|
|
787
|
-
this.commandService.executeCommand(CLEAR_NOTIFICATION, notification);
|
|
788
|
-
}
|
|
789
|
-
};
|
|
790
|
-
ClearNotificationAction.ID = CLEAR_NOTIFICATION;
|
|
791
|
-
ClearNotificationAction.LABEL = ( (localize('clearNotification', "Clear Notification")));
|
|
792
|
-
ClearNotificationAction = ( (__decorate([
|
|
793
|
-
( (__param(2, ICommandService)))
|
|
794
|
-
], ClearNotificationAction)));
|
|
795
|
-
let ClearAllNotificationsAction = class ClearAllNotificationsAction extends Action {
|
|
796
|
-
constructor(id, label, commandService) {
|
|
797
|
-
super(id, label, ThemeIcon.asClassName(clearAllIcon));
|
|
798
|
-
this.commandService = commandService;
|
|
799
|
-
}
|
|
800
|
-
async run() {
|
|
801
|
-
this.commandService.executeCommand(CLEAR_ALL_NOTIFICATIONS);
|
|
802
|
-
}
|
|
803
|
-
};
|
|
804
|
-
ClearAllNotificationsAction.ID = CLEAR_ALL_NOTIFICATIONS;
|
|
805
|
-
ClearAllNotificationsAction.LABEL = ( (localize('clearNotifications', "Clear All Notifications")));
|
|
806
|
-
ClearAllNotificationsAction = ( (__decorate([
|
|
807
|
-
( (__param(2, ICommandService)))
|
|
808
|
-
], ClearAllNotificationsAction)));
|
|
809
|
-
let ToggleDoNotDisturbAction = class ToggleDoNotDisturbAction extends Action {
|
|
810
|
-
constructor(id, label, commandService) {
|
|
811
|
-
super(id, label, ThemeIcon.asClassName(doNotDisturbIcon));
|
|
812
|
-
this.commandService = commandService;
|
|
813
|
-
}
|
|
814
|
-
async run() {
|
|
815
|
-
this.commandService.executeCommand(TOGGLE_DO_NOT_DISTURB_MODE);
|
|
816
|
-
}
|
|
817
|
-
};
|
|
818
|
-
ToggleDoNotDisturbAction.ID = TOGGLE_DO_NOT_DISTURB_MODE;
|
|
819
|
-
ToggleDoNotDisturbAction.LABEL = ( (localize('toggleDoNotDisturbMode', "Toggle Do Not Disturb Mode")));
|
|
820
|
-
ToggleDoNotDisturbAction = ( (__decorate([
|
|
821
|
-
( (__param(2, ICommandService)))
|
|
822
|
-
], ToggleDoNotDisturbAction)));
|
|
823
|
-
let HideNotificationsCenterAction = class HideNotificationsCenterAction extends Action {
|
|
824
|
-
constructor(id, label, commandService) {
|
|
825
|
-
super(id, label, ThemeIcon.asClassName(hideIcon));
|
|
826
|
-
this.commandService = commandService;
|
|
827
|
-
}
|
|
828
|
-
async run() {
|
|
829
|
-
this.commandService.executeCommand(HIDE_NOTIFICATIONS_CENTER);
|
|
830
|
-
}
|
|
831
|
-
};
|
|
832
|
-
HideNotificationsCenterAction.ID = HIDE_NOTIFICATIONS_CENTER;
|
|
833
|
-
HideNotificationsCenterAction.LABEL = ( (localize('hideNotificationsCenter', "Hide Notifications")));
|
|
834
|
-
HideNotificationsCenterAction = ( (__decorate([
|
|
835
|
-
( (__param(2, ICommandService)))
|
|
836
|
-
], HideNotificationsCenterAction)));
|
|
837
|
-
let ExpandNotificationAction = class ExpandNotificationAction extends Action {
|
|
838
|
-
constructor(id, label, commandService) {
|
|
839
|
-
super(id, label, ThemeIcon.asClassName(expandIcon));
|
|
840
|
-
this.commandService = commandService;
|
|
841
|
-
}
|
|
842
|
-
async run(notification) {
|
|
843
|
-
this.commandService.executeCommand(EXPAND_NOTIFICATION, notification);
|
|
844
|
-
}
|
|
845
|
-
};
|
|
846
|
-
ExpandNotificationAction.ID = EXPAND_NOTIFICATION;
|
|
847
|
-
ExpandNotificationAction.LABEL = ( (localize('expandNotification', "Expand Notification")));
|
|
848
|
-
ExpandNotificationAction = ( (__decorate([
|
|
849
|
-
( (__param(2, ICommandService)))
|
|
850
|
-
], ExpandNotificationAction)));
|
|
851
|
-
let CollapseNotificationAction = class CollapseNotificationAction extends Action {
|
|
852
|
-
constructor(id, label, commandService) {
|
|
853
|
-
super(id, label, ThemeIcon.asClassName(collapseIcon));
|
|
854
|
-
this.commandService = commandService;
|
|
855
|
-
}
|
|
856
|
-
async run(notification) {
|
|
857
|
-
this.commandService.executeCommand(COLLAPSE_NOTIFICATION, notification);
|
|
858
|
-
}
|
|
859
|
-
};
|
|
860
|
-
CollapseNotificationAction.ID = COLLAPSE_NOTIFICATION;
|
|
861
|
-
CollapseNotificationAction.LABEL = ( (localize('collapseNotification', "Collapse Notification")));
|
|
862
|
-
CollapseNotificationAction = ( (__decorate([
|
|
863
|
-
( (__param(2, ICommandService)))
|
|
864
|
-
], CollapseNotificationAction)));
|
|
865
|
-
class ConfigureNotificationAction extends Action {
|
|
866
|
-
constructor(id, label, configurationActions) {
|
|
867
|
-
super(id, label, ThemeIcon.asClassName(configureIcon));
|
|
868
|
-
this.configurationActions = configurationActions;
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
ConfigureNotificationAction.ID = 'workbench.action.configureNotification';
|
|
872
|
-
ConfigureNotificationAction.LABEL = ( (localize('configureNotification', "Configure Notification")));
|
|
873
|
-
let CopyNotificationMessageAction = class CopyNotificationMessageAction extends Action {
|
|
874
|
-
constructor(id, label, clipboardService) {
|
|
875
|
-
super(id, label);
|
|
876
|
-
this.clipboardService = clipboardService;
|
|
877
|
-
}
|
|
878
|
-
run(notification) {
|
|
879
|
-
return this.clipboardService.writeText(notification.message.raw);
|
|
880
|
-
}
|
|
881
|
-
};
|
|
882
|
-
CopyNotificationMessageAction.ID = 'workbench.action.copyNotificationMessage';
|
|
883
|
-
CopyNotificationMessageAction.LABEL = ( (localize('copyNotification', "Copy Text")));
|
|
884
|
-
CopyNotificationMessageAction = ( (__decorate([
|
|
885
|
-
( (__param(2, IClipboardService)))
|
|
886
|
-
], CopyNotificationMessageAction)));
|
|
887
|
-
class NotificationsListDelegate {
|
|
888
|
-
constructor(container) {
|
|
889
|
-
this.offsetHelper = this.createOffsetHelper(container);
|
|
890
|
-
}
|
|
891
|
-
createOffsetHelper(container) {
|
|
892
|
-
const offsetHelper = document.createElement('div');
|
|
893
|
-
offsetHelper.classList.add('notification-offset-helper');
|
|
894
|
-
container.appendChild(offsetHelper);
|
|
895
|
-
return offsetHelper;
|
|
896
|
-
}
|
|
897
|
-
getHeight(notification) {
|
|
898
|
-
if (!notification.expanded) {
|
|
899
|
-
return NotificationsListDelegate.ROW_HEIGHT;
|
|
900
|
-
}
|
|
901
|
-
let expandedHeight = NotificationsListDelegate.ROW_HEIGHT;
|
|
902
|
-
const preferredMessageHeight = this.computePreferredHeight(notification);
|
|
903
|
-
const messageOverflows = NotificationsListDelegate.LINE_HEIGHT < preferredMessageHeight;
|
|
904
|
-
if (messageOverflows) {
|
|
905
|
-
const overflow = preferredMessageHeight - NotificationsListDelegate.LINE_HEIGHT;
|
|
906
|
-
expandedHeight += overflow;
|
|
907
|
-
}
|
|
908
|
-
if (notification.source || isNonEmptyArray(notification.actions && notification.actions.primary)) {
|
|
909
|
-
expandedHeight += NotificationsListDelegate.ROW_HEIGHT;
|
|
910
|
-
}
|
|
911
|
-
if (expandedHeight === NotificationsListDelegate.ROW_HEIGHT) {
|
|
912
|
-
notification.collapse(true );
|
|
913
|
-
}
|
|
914
|
-
return expandedHeight;
|
|
915
|
-
}
|
|
916
|
-
computePreferredHeight(notification) {
|
|
917
|
-
let actions = 1;
|
|
918
|
-
if (notification.canCollapse) {
|
|
919
|
-
actions++;
|
|
920
|
-
}
|
|
921
|
-
if (isNonEmptyArray(notification.actions && notification.actions.secondary)) {
|
|
922
|
-
actions++;
|
|
923
|
-
}
|
|
924
|
-
this.offsetHelper.style.width = `${450 - ((10 + 26 + (actions * (24 + 8)) - 4) )}px`;
|
|
925
|
-
const renderedMessage = NotificationMessageRenderer.render(notification.message);
|
|
926
|
-
this.offsetHelper.appendChild(renderedMessage);
|
|
927
|
-
const preferredHeight = Math.max(this.offsetHelper.offsetHeight, this.offsetHelper.scrollHeight);
|
|
928
|
-
clearNode(this.offsetHelper);
|
|
929
|
-
return preferredHeight;
|
|
930
|
-
}
|
|
931
|
-
getTemplateId(element) {
|
|
932
|
-
if (element instanceof NotificationViewItem) {
|
|
933
|
-
return NotificationRenderer.TEMPLATE_ID;
|
|
934
|
-
}
|
|
935
|
-
throw new Error('unknown element type: ' + element);
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
NotificationsListDelegate.ROW_HEIGHT = 42;
|
|
939
|
-
NotificationsListDelegate.LINE_HEIGHT = 22;
|
|
940
|
-
class NotificationMessageRenderer {
|
|
941
|
-
static render(message, actionHandler) {
|
|
942
|
-
const messageContainer = document.createElement('span');
|
|
943
|
-
for (const node of message.linkedText.nodes) {
|
|
944
|
-
if (typeof node === 'string') {
|
|
945
|
-
messageContainer.appendChild(document.createTextNode(node));
|
|
946
|
-
}
|
|
947
|
-
else {
|
|
948
|
-
let title = node.title;
|
|
949
|
-
if (!title && node.href.startsWith('command:')) {
|
|
950
|
-
title = ( (localize(
|
|
951
|
-
'executeCommand',
|
|
952
|
-
"Click to execute command '{0}'",
|
|
953
|
-
node.href.substr('command:'.length)
|
|
954
|
-
)));
|
|
955
|
-
}
|
|
956
|
-
else if (!title) {
|
|
957
|
-
title = node.href;
|
|
958
|
-
}
|
|
959
|
-
const anchor = $('a', { href: node.href, title, tabIndex: 0 }, node.label);
|
|
960
|
-
if (actionHandler) {
|
|
961
|
-
const handleOpen = (e) => {
|
|
962
|
-
if (isEventLike(e)) {
|
|
963
|
-
EventHelper.stop(e, true);
|
|
964
|
-
}
|
|
965
|
-
actionHandler.callback(node.href);
|
|
966
|
-
};
|
|
967
|
-
const onClick = actionHandler.toDispose.add(( (new DomEmitter(anchor, EventType.CLICK)))).event;
|
|
968
|
-
const onKeydown = actionHandler.toDispose.add(( (new DomEmitter(anchor, EventType.KEY_DOWN)))).event;
|
|
969
|
-
const onSpaceOrEnter = actionHandler.toDispose.add(Event.chain(onKeydown)).filter(e => {
|
|
970
|
-
const event = ( (new StandardKeyboardEvent(e)));
|
|
971
|
-
return event.equals(10 ) || event.equals(3 );
|
|
972
|
-
}).event;
|
|
973
|
-
actionHandler.toDispose.add(Gesture.addTarget(anchor));
|
|
974
|
-
const onTap = actionHandler.toDispose.add(( (new DomEmitter(anchor, EventType$1.Tap)))).event;
|
|
975
|
-
Event.any(onClick, onTap, onSpaceOrEnter)(handleOpen, null, actionHandler.toDispose);
|
|
976
|
-
}
|
|
977
|
-
messageContainer.appendChild(anchor);
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
return messageContainer;
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
let NotificationRenderer = class NotificationRenderer {
|
|
984
|
-
constructor(actionRunner, contextMenuService, instantiationService) {
|
|
985
|
-
this.actionRunner = actionRunner;
|
|
986
|
-
this.contextMenuService = contextMenuService;
|
|
987
|
-
this.instantiationService = instantiationService;
|
|
988
|
-
}
|
|
989
|
-
get templateId() {
|
|
990
|
-
return NotificationRenderer.TEMPLATE_ID;
|
|
991
|
-
}
|
|
992
|
-
renderTemplate(container) {
|
|
993
|
-
const data = Object.create(null);
|
|
994
|
-
data.toDispose = ( (new DisposableStore()));
|
|
995
|
-
data.container = document.createElement('div');
|
|
996
|
-
data.container.classList.add('notification-list-item');
|
|
997
|
-
data.mainRow = document.createElement('div');
|
|
998
|
-
data.mainRow.classList.add('notification-list-item-main-row');
|
|
999
|
-
data.icon = document.createElement('div');
|
|
1000
|
-
data.icon.classList.add('notification-list-item-icon', 'codicon');
|
|
1001
|
-
data.message = document.createElement('div');
|
|
1002
|
-
data.message.classList.add('notification-list-item-message');
|
|
1003
|
-
const toolbarContainer = document.createElement('div');
|
|
1004
|
-
toolbarContainer.classList.add('notification-list-item-toolbar-container');
|
|
1005
|
-
data.toolbar = ( (new ActionBar(toolbarContainer, {
|
|
1006
|
-
ariaLabel: ( (localize('notificationActions', "Notification Actions"))),
|
|
1007
|
-
actionViewItemProvider: action => {
|
|
1008
|
-
if (action && action instanceof ConfigureNotificationAction) {
|
|
1009
|
-
const item = ( (new DropdownMenuActionViewItem(
|
|
1010
|
-
action,
|
|
1011
|
-
action.configurationActions,
|
|
1012
|
-
this.contextMenuService,
|
|
1013
|
-
{ actionRunner: this.actionRunner, classNames: action.class }
|
|
1014
|
-
)));
|
|
1015
|
-
data.toDispose.add(item);
|
|
1016
|
-
return item;
|
|
1017
|
-
}
|
|
1018
|
-
return undefined;
|
|
1019
|
-
},
|
|
1020
|
-
actionRunner: this.actionRunner
|
|
1021
|
-
})));
|
|
1022
|
-
data.toDispose.add(data.toolbar);
|
|
1023
|
-
data.detailsRow = document.createElement('div');
|
|
1024
|
-
data.detailsRow.classList.add('notification-list-item-details-row');
|
|
1025
|
-
data.source = document.createElement('div');
|
|
1026
|
-
data.source.classList.add('notification-list-item-source');
|
|
1027
|
-
data.buttonsContainer = document.createElement('div');
|
|
1028
|
-
data.buttonsContainer.classList.add('notification-list-item-buttons-container');
|
|
1029
|
-
container.appendChild(data.container);
|
|
1030
|
-
data.container.appendChild(data.detailsRow);
|
|
1031
|
-
data.detailsRow.appendChild(data.source);
|
|
1032
|
-
data.detailsRow.appendChild(data.buttonsContainer);
|
|
1033
|
-
data.container.appendChild(data.mainRow);
|
|
1034
|
-
data.mainRow.appendChild(data.icon);
|
|
1035
|
-
data.mainRow.appendChild(data.message);
|
|
1036
|
-
data.mainRow.appendChild(toolbarContainer);
|
|
1037
|
-
data.progress = ( (new ProgressBar(container, defaultProgressBarStyles)));
|
|
1038
|
-
data.toDispose.add(data.progress);
|
|
1039
|
-
data.renderer = this.instantiationService.createInstance(NotificationTemplateRenderer, data, this.actionRunner);
|
|
1040
|
-
data.toDispose.add(data.renderer);
|
|
1041
|
-
return data;
|
|
1042
|
-
}
|
|
1043
|
-
renderElement(notification, index, data) {
|
|
1044
|
-
data.renderer.setInput(notification);
|
|
1045
|
-
}
|
|
1046
|
-
disposeTemplate(templateData) {
|
|
1047
|
-
dispose(templateData.toDispose);
|
|
1048
|
-
}
|
|
1049
|
-
};
|
|
1050
|
-
NotificationRenderer.TEMPLATE_ID = 'notification';
|
|
1051
|
-
NotificationRenderer = ( (__decorate([
|
|
1052
|
-
( (__param(1, IContextMenuService))),
|
|
1053
|
-
( (__param(2, IInstantiationService)))
|
|
1054
|
-
], NotificationRenderer)));
|
|
1055
|
-
let NotificationTemplateRenderer = class NotificationTemplateRenderer extends Disposable {
|
|
1056
|
-
constructor(template, actionRunner, openerService, instantiationService, keybindingService, contextMenuService) {
|
|
1057
|
-
super();
|
|
1058
|
-
this.template = template;
|
|
1059
|
-
this.actionRunner = actionRunner;
|
|
1060
|
-
this.openerService = openerService;
|
|
1061
|
-
this.instantiationService = instantiationService;
|
|
1062
|
-
this.keybindingService = keybindingService;
|
|
1063
|
-
this.contextMenuService = contextMenuService;
|
|
1064
|
-
this.inputDisposables = this._register(( (new DisposableStore())));
|
|
1065
|
-
if (!NotificationTemplateRenderer.closeNotificationAction) {
|
|
1066
|
-
NotificationTemplateRenderer.closeNotificationAction = instantiationService.createInstance(ClearNotificationAction, ClearNotificationAction.ID, ClearNotificationAction.LABEL);
|
|
1067
|
-
NotificationTemplateRenderer.expandNotificationAction = instantiationService.createInstance(ExpandNotificationAction, ExpandNotificationAction.ID, ExpandNotificationAction.LABEL);
|
|
1068
|
-
NotificationTemplateRenderer.collapseNotificationAction = instantiationService.createInstance(CollapseNotificationAction, CollapseNotificationAction.ID, CollapseNotificationAction.LABEL);
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
setInput(notification) {
|
|
1072
|
-
this.inputDisposables.clear();
|
|
1073
|
-
this.render(notification);
|
|
1074
|
-
}
|
|
1075
|
-
render(notification) {
|
|
1076
|
-
this.template.container.classList.toggle('expanded', notification.expanded);
|
|
1077
|
-
this.inputDisposables.add(addDisposableListener(this.template.container, EventType.MOUSE_UP, e => {
|
|
1078
|
-
if (e.button === 1 ) {
|
|
1079
|
-
EventHelper.stop(e, true);
|
|
1080
|
-
}
|
|
1081
|
-
}));
|
|
1082
|
-
this.inputDisposables.add(addDisposableListener(this.template.container, EventType.AUXCLICK, e => {
|
|
1083
|
-
if (!notification.hasProgress && e.button === 1 ) {
|
|
1084
|
-
EventHelper.stop(e, true);
|
|
1085
|
-
notification.close();
|
|
1086
|
-
}
|
|
1087
|
-
}));
|
|
1088
|
-
this.renderSeverity(notification);
|
|
1089
|
-
const messageOverflows = this.renderMessage(notification);
|
|
1090
|
-
this.renderSecondaryActions(notification, messageOverflows);
|
|
1091
|
-
this.renderSource(notification);
|
|
1092
|
-
this.renderButtons(notification);
|
|
1093
|
-
this.renderProgress(notification);
|
|
1094
|
-
this.inputDisposables.add(notification.onDidChangeContent(event => {
|
|
1095
|
-
switch (event.kind) {
|
|
1096
|
-
case 0 :
|
|
1097
|
-
this.renderSeverity(notification);
|
|
1098
|
-
break;
|
|
1099
|
-
case 3 :
|
|
1100
|
-
this.renderProgress(notification);
|
|
1101
|
-
break;
|
|
1102
|
-
case 1 :
|
|
1103
|
-
this.renderMessage(notification);
|
|
1104
|
-
break;
|
|
1105
|
-
}
|
|
1106
|
-
}));
|
|
1107
|
-
}
|
|
1108
|
-
renderSeverity(notification) {
|
|
1109
|
-
NotificationTemplateRenderer.SEVERITIES.forEach(severity => {
|
|
1110
|
-
if (notification.severity !== severity) {
|
|
1111
|
-
this.template.icon.classList.remove(...ThemeIcon.asClassNameArray(this.toSeverityIcon(severity)));
|
|
1112
|
-
}
|
|
1113
|
-
});
|
|
1114
|
-
this.template.icon.classList.add(...ThemeIcon.asClassNameArray(this.toSeverityIcon(notification.severity)));
|
|
1115
|
-
}
|
|
1116
|
-
renderMessage(notification) {
|
|
1117
|
-
clearNode(this.template.message);
|
|
1118
|
-
this.template.message.appendChild(NotificationMessageRenderer.render(notification.message, {
|
|
1119
|
-
callback: link => this.openerService.open(( (URI.parse(link))), { allowCommands: true }),
|
|
1120
|
-
toDispose: this.inputDisposables
|
|
1121
|
-
}));
|
|
1122
|
-
const messageOverflows = notification.canCollapse && !notification.expanded && this.template.message.scrollWidth > this.template.message.clientWidth;
|
|
1123
|
-
if (messageOverflows) {
|
|
1124
|
-
this.template.message.title = this.template.message.textContent + '';
|
|
1125
|
-
}
|
|
1126
|
-
else {
|
|
1127
|
-
this.template.message.removeAttribute('title');
|
|
1128
|
-
}
|
|
1129
|
-
return messageOverflows;
|
|
1130
|
-
}
|
|
1131
|
-
renderSecondaryActions(notification, messageOverflows) {
|
|
1132
|
-
const actions = [];
|
|
1133
|
-
const secondaryActions = notification.actions ? notification.actions.secondary : undefined;
|
|
1134
|
-
if (isNonEmptyArray(secondaryActions)) {
|
|
1135
|
-
const configureNotificationAction = this.instantiationService.createInstance(ConfigureNotificationAction, ConfigureNotificationAction.ID, ConfigureNotificationAction.LABEL, secondaryActions);
|
|
1136
|
-
actions.push(configureNotificationAction);
|
|
1137
|
-
this.inputDisposables.add(configureNotificationAction);
|
|
1138
|
-
}
|
|
1139
|
-
let showExpandCollapseAction = false;
|
|
1140
|
-
if (notification.canCollapse) {
|
|
1141
|
-
if (notification.expanded) {
|
|
1142
|
-
showExpandCollapseAction = true;
|
|
1143
|
-
}
|
|
1144
|
-
else if (notification.source) {
|
|
1145
|
-
showExpandCollapseAction = true;
|
|
1146
|
-
}
|
|
1147
|
-
else if (messageOverflows) {
|
|
1148
|
-
showExpandCollapseAction = true;
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
if (showExpandCollapseAction) {
|
|
1152
|
-
actions.push(notification.expanded ? NotificationTemplateRenderer.collapseNotificationAction : NotificationTemplateRenderer.expandNotificationAction);
|
|
1153
|
-
}
|
|
1154
|
-
if (!notification.hasProgress) {
|
|
1155
|
-
actions.push(NotificationTemplateRenderer.closeNotificationAction);
|
|
1156
|
-
}
|
|
1157
|
-
this.template.toolbar.clear();
|
|
1158
|
-
this.template.toolbar.context = notification;
|
|
1159
|
-
actions.forEach(action => this.template.toolbar.push(action, { icon: true, label: false, keybinding: this.getKeybindingLabel(action) }));
|
|
1160
|
-
}
|
|
1161
|
-
renderSource(notification) {
|
|
1162
|
-
if (notification.expanded && notification.source) {
|
|
1163
|
-
this.template.source.textContent = ( (localize('notificationSource', "Source: {0}", notification.source)));
|
|
1164
|
-
this.template.source.title = notification.source;
|
|
1165
|
-
}
|
|
1166
|
-
else {
|
|
1167
|
-
this.template.source.textContent = '';
|
|
1168
|
-
this.template.source.removeAttribute('title');
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
renderButtons(notification) {
|
|
1172
|
-
clearNode(this.template.buttonsContainer);
|
|
1173
|
-
const primaryActions = notification.actions ? notification.actions.primary : undefined;
|
|
1174
|
-
if (notification.expanded && isNonEmptyArray(primaryActions)) {
|
|
1175
|
-
const that = this;
|
|
1176
|
-
const actionRunner = new (class extends ActionRunner {
|
|
1177
|
-
async runAction(action) {
|
|
1178
|
-
that.actionRunner.run(action, notification);
|
|
1179
|
-
if (!(action instanceof ChoiceAction) || !action.keepOpen) {
|
|
1180
|
-
notification.close();
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
})();
|
|
1184
|
-
const buttonToolbar = this.inputDisposables.add(( (new ButtonBar(this.template.buttonsContainer))));
|
|
1185
|
-
for (let i = 0; i < primaryActions.length; i++) {
|
|
1186
|
-
const action = primaryActions[i];
|
|
1187
|
-
const options = {
|
|
1188
|
-
title: true,
|
|
1189
|
-
secondary: i > 0,
|
|
1190
|
-
...defaultButtonStyles
|
|
1191
|
-
};
|
|
1192
|
-
const dropdownActions = action instanceof ChoiceAction ? action.menu : undefined;
|
|
1193
|
-
const button = this.inputDisposables.add(dropdownActions ?
|
|
1194
|
-
buttonToolbar.addButtonWithDropdown({
|
|
1195
|
-
...options,
|
|
1196
|
-
contextMenuProvider: this.contextMenuService,
|
|
1197
|
-
actions: dropdownActions,
|
|
1198
|
-
actionRunner
|
|
1199
|
-
}) :
|
|
1200
|
-
buttonToolbar.addButton(options));
|
|
1201
|
-
button.label = action.label;
|
|
1202
|
-
this.inputDisposables.add(button.onDidClick(e => {
|
|
1203
|
-
if (e) {
|
|
1204
|
-
EventHelper.stop(e, true);
|
|
1205
|
-
}
|
|
1206
|
-
actionRunner.run(action);
|
|
1207
|
-
}));
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
renderProgress(notification) {
|
|
1212
|
-
if (!notification.hasProgress) {
|
|
1213
|
-
this.template.progress.stop().hide();
|
|
1214
|
-
return;
|
|
1215
|
-
}
|
|
1216
|
-
const state = notification.progress.state;
|
|
1217
|
-
if (state.infinite) {
|
|
1218
|
-
this.template.progress.infinite().show();
|
|
1219
|
-
}
|
|
1220
|
-
else if (typeof state.total === 'number' || typeof state.worked === 'number') {
|
|
1221
|
-
if (typeof state.total === 'number' && !this.template.progress.hasTotal()) {
|
|
1222
|
-
this.template.progress.total(state.total);
|
|
1223
|
-
}
|
|
1224
|
-
if (typeof state.worked === 'number') {
|
|
1225
|
-
this.template.progress.setWorked(state.worked).show();
|
|
1226
|
-
}
|
|
1227
|
-
}
|
|
1228
|
-
else {
|
|
1229
|
-
this.template.progress.done().hide();
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
toSeverityIcon(severity) {
|
|
1233
|
-
switch (severity) {
|
|
1234
|
-
case Severity.Warning:
|
|
1235
|
-
return Codicon.warning;
|
|
1236
|
-
case Severity.Error:
|
|
1237
|
-
return Codicon.error;
|
|
1238
|
-
}
|
|
1239
|
-
return Codicon.info;
|
|
1240
|
-
}
|
|
1241
|
-
getKeybindingLabel(action) {
|
|
1242
|
-
const keybinding = this.keybindingService.lookupKeybinding(action.id);
|
|
1243
|
-
return keybinding ? keybinding.getLabel() : null;
|
|
1244
|
-
}
|
|
1245
|
-
};
|
|
1246
|
-
NotificationTemplateRenderer.SEVERITIES = [Severity.Info, Severity.Warning, Severity.Error];
|
|
1247
|
-
NotificationTemplateRenderer = ( (__decorate([
|
|
1248
|
-
( (__param(2, IOpenerService))),
|
|
1249
|
-
( (__param(3, IInstantiationService))),
|
|
1250
|
-
( (__param(4, IKeybindingService))),
|
|
1251
|
-
( (__param(5, IContextMenuService)))
|
|
1252
|
-
], NotificationTemplateRenderer)));
|
|
1253
|
-
let NotificationsList = class NotificationsList extends Disposable {
|
|
1254
|
-
constructor(container, options, instantiationService, contextMenuService) {
|
|
1255
|
-
super();
|
|
1256
|
-
this.container = container;
|
|
1257
|
-
this.options = options;
|
|
1258
|
-
this.instantiationService = instantiationService;
|
|
1259
|
-
this.contextMenuService = contextMenuService;
|
|
1260
|
-
this.viewModel = [];
|
|
1261
|
-
}
|
|
1262
|
-
show(focus) {
|
|
1263
|
-
if (this.isVisible) {
|
|
1264
|
-
if (focus) {
|
|
1265
|
-
const list = assertIsDefined(this.list);
|
|
1266
|
-
list.domFocus();
|
|
1267
|
-
}
|
|
1268
|
-
return;
|
|
1269
|
-
}
|
|
1270
|
-
if (!this.list) {
|
|
1271
|
-
this.createNotificationsList();
|
|
1272
|
-
}
|
|
1273
|
-
this.isVisible = true;
|
|
1274
|
-
if (focus) {
|
|
1275
|
-
const list = assertIsDefined(this.list);
|
|
1276
|
-
list.domFocus();
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
createNotificationsList() {
|
|
1280
|
-
this.listContainer = document.createElement('div');
|
|
1281
|
-
this.listContainer.classList.add('notifications-list-container');
|
|
1282
|
-
const actionRunner = this._register(this.instantiationService.createInstance(NotificationActionRunner));
|
|
1283
|
-
const renderer = this.instantiationService.createInstance(NotificationRenderer, actionRunner);
|
|
1284
|
-
const listDelegate = this.listDelegate = ( (new NotificationsListDelegate(this.listContainer)));
|
|
1285
|
-
const options = this.options;
|
|
1286
|
-
const list = this.list = this._register(this.instantiationService.createInstance(WorkbenchList, 'NotificationsList', this.listContainer, listDelegate, [renderer], {
|
|
1287
|
-
...options,
|
|
1288
|
-
setRowLineHeight: false,
|
|
1289
|
-
horizontalScrolling: false,
|
|
1290
|
-
overrideStyles: {
|
|
1291
|
-
listBackground: NOTIFICATIONS_BACKGROUND
|
|
1292
|
-
},
|
|
1293
|
-
accessibilityProvider: {
|
|
1294
|
-
getAriaLabel(element) {
|
|
1295
|
-
if (!element.source) {
|
|
1296
|
-
return (
|
|
1297
|
-
(localize('notificationAriaLabel', "{0}, notification", element.message.raw))
|
|
1298
|
-
);
|
|
1299
|
-
}
|
|
1300
|
-
return (
|
|
1301
|
-
(localize(
|
|
1302
|
-
'notificationWithSourceAriaLabel',
|
|
1303
|
-
"{0}, source: {1}, notification",
|
|
1304
|
-
element.message.raw,
|
|
1305
|
-
element.source
|
|
1306
|
-
))
|
|
1307
|
-
);
|
|
1308
|
-
},
|
|
1309
|
-
getWidgetAriaLabel() {
|
|
1310
|
-
return options.widgetAriaLabel ?? ( (localize('notificationsList', "Notifications List")));
|
|
1311
|
-
},
|
|
1312
|
-
getRole() {
|
|
1313
|
-
return 'dialog';
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1316
|
-
}));
|
|
1317
|
-
const copyAction = this._register(this.instantiationService.createInstance(CopyNotificationMessageAction, CopyNotificationMessageAction.ID, CopyNotificationMessageAction.LABEL));
|
|
1318
|
-
this._register((list.onContextMenu(e => {
|
|
1319
|
-
if (!e.element) {
|
|
1320
|
-
return;
|
|
1321
|
-
}
|
|
1322
|
-
this.contextMenuService.showContextMenu({
|
|
1323
|
-
getAnchor: () => e.anchor,
|
|
1324
|
-
getActions: () => [copyAction],
|
|
1325
|
-
getActionsContext: () => e.element,
|
|
1326
|
-
actionRunner
|
|
1327
|
-
});
|
|
1328
|
-
})));
|
|
1329
|
-
this._register((list.onMouseDblClick(event => event.element.toggle())));
|
|
1330
|
-
const listFocusTracker = this._register(trackFocus(list.getHTMLElement()));
|
|
1331
|
-
this._register(listFocusTracker.onDidBlur(() => {
|
|
1332
|
-
if (document.hasFocus()) {
|
|
1333
|
-
list.setFocus([]);
|
|
1334
|
-
}
|
|
1335
|
-
}));
|
|
1336
|
-
NotificationFocusedContext.bindTo(list.contextKeyService);
|
|
1337
|
-
this._register(list.onDidChangeSelection(e => {
|
|
1338
|
-
if (e.indexes.length > 0) {
|
|
1339
|
-
list.setSelection([]);
|
|
1340
|
-
}
|
|
1341
|
-
}));
|
|
1342
|
-
this.container.appendChild(this.listContainer);
|
|
1343
|
-
}
|
|
1344
|
-
updateNotificationsList(start, deleteCount, items = []) {
|
|
1345
|
-
const [list, listContainer] = assertAllDefined(this.list, this.listContainer);
|
|
1346
|
-
const listHasDOMFocus = isAncestor(document.activeElement, listContainer);
|
|
1347
|
-
const focusedIndex = list.getFocus()[0];
|
|
1348
|
-
const focusedItem = this.viewModel[focusedIndex];
|
|
1349
|
-
let focusRelativeTop = null;
|
|
1350
|
-
if (typeof focusedIndex === 'number') {
|
|
1351
|
-
focusRelativeTop = list.getRelativeTop(focusedIndex);
|
|
1352
|
-
}
|
|
1353
|
-
this.viewModel.splice(start, deleteCount, ...items);
|
|
1354
|
-
list.splice(start, deleteCount, items);
|
|
1355
|
-
list.layout();
|
|
1356
|
-
if (this.viewModel.length === 0) {
|
|
1357
|
-
this.hide();
|
|
1358
|
-
}
|
|
1359
|
-
else if (typeof focusedIndex === 'number') {
|
|
1360
|
-
let indexToFocus = 0;
|
|
1361
|
-
if (focusedItem) {
|
|
1362
|
-
let indexToFocusCandidate = this.viewModel.indexOf(focusedItem);
|
|
1363
|
-
if (indexToFocusCandidate === -1) {
|
|
1364
|
-
indexToFocusCandidate = focusedIndex - 1;
|
|
1365
|
-
}
|
|
1366
|
-
if (indexToFocusCandidate < this.viewModel.length && indexToFocusCandidate >= 0) {
|
|
1367
|
-
indexToFocus = indexToFocusCandidate;
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
if (typeof focusRelativeTop === 'number') {
|
|
1371
|
-
list.reveal(indexToFocus, focusRelativeTop);
|
|
1372
|
-
}
|
|
1373
|
-
list.setFocus([indexToFocus]);
|
|
1374
|
-
}
|
|
1375
|
-
if (this.isVisible && listHasDOMFocus) {
|
|
1376
|
-
list.domFocus();
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
|
-
updateNotificationHeight(item) {
|
|
1380
|
-
const index = this.viewModel.indexOf(item);
|
|
1381
|
-
if (index === -1) {
|
|
1382
|
-
return;
|
|
1383
|
-
}
|
|
1384
|
-
const [list, listDelegate] = assertAllDefined(this.list, this.listDelegate);
|
|
1385
|
-
list.updateElementHeight(index, listDelegate.getHeight(item));
|
|
1386
|
-
list.layout();
|
|
1387
|
-
}
|
|
1388
|
-
hide() {
|
|
1389
|
-
if (!this.isVisible || !this.list) {
|
|
1390
|
-
return;
|
|
1391
|
-
}
|
|
1392
|
-
this.isVisible = false;
|
|
1393
|
-
this.list.splice(0, this.viewModel.length);
|
|
1394
|
-
this.viewModel = [];
|
|
1395
|
-
}
|
|
1396
|
-
focusFirst() {
|
|
1397
|
-
if (!this.isVisible || !this.list) {
|
|
1398
|
-
return;
|
|
1399
|
-
}
|
|
1400
|
-
this.list.focusFirst();
|
|
1401
|
-
this.list.domFocus();
|
|
1402
|
-
}
|
|
1403
|
-
hasFocus() {
|
|
1404
|
-
if (!this.isVisible || !this.listContainer) {
|
|
1405
|
-
return false;
|
|
1406
|
-
}
|
|
1407
|
-
return isAncestor(document.activeElement, this.listContainer);
|
|
1408
|
-
}
|
|
1409
|
-
layout(width, maxHeight) {
|
|
1410
|
-
if (this.listContainer && this.list) {
|
|
1411
|
-
this.listContainer.style.width = `${width}px`;
|
|
1412
|
-
if (typeof maxHeight === 'number') {
|
|
1413
|
-
this.list.getHTMLElement().style.maxHeight = `${maxHeight}px`;
|
|
1414
|
-
}
|
|
1415
|
-
this.list.layout();
|
|
1416
|
-
}
|
|
1417
|
-
}
|
|
1418
|
-
dispose() {
|
|
1419
|
-
this.hide();
|
|
1420
|
-
super.dispose();
|
|
1421
|
-
}
|
|
1422
|
-
};
|
|
1423
|
-
NotificationsList = ( (__decorate([
|
|
1424
|
-
( (__param(2, IInstantiationService))),
|
|
1425
|
-
( (__param(3, IContextMenuService)))
|
|
1426
|
-
], NotificationsList)));
|
|
1427
|
-
var ToastVisibility;
|
|
1428
|
-
( ((function(ToastVisibility) {
|
|
1429
|
-
ToastVisibility[ToastVisibility["HIDDEN_OR_VISIBLE"] = 0] = "HIDDEN_OR_VISIBLE";
|
|
1430
|
-
ToastVisibility[ToastVisibility["HIDDEN"] = 1] = "HIDDEN";
|
|
1431
|
-
ToastVisibility[ToastVisibility["VISIBLE"] = 2] = "VISIBLE";
|
|
1432
|
-
})(ToastVisibility || (ToastVisibility = {}))));
|
|
1433
|
-
let NotificationsToasts = class NotificationsToasts extends Themable {
|
|
1434
|
-
get isVisible() { return !!this._isVisible; }
|
|
1435
|
-
constructor(container, model, instantiationService, layoutService, themeService, editorGroupService, contextKeyService, lifecycleService, hostService) {
|
|
1436
|
-
super(themeService);
|
|
1437
|
-
this.container = container;
|
|
1438
|
-
this.model = model;
|
|
1439
|
-
this.instantiationService = instantiationService;
|
|
1440
|
-
this.layoutService = layoutService;
|
|
1441
|
-
this.editorGroupService = editorGroupService;
|
|
1442
|
-
this.contextKeyService = contextKeyService;
|
|
1443
|
-
this.lifecycleService = lifecycleService;
|
|
1444
|
-
this.hostService = hostService;
|
|
1445
|
-
this._onDidChangeVisibility = this._register(( (new Emitter())));
|
|
1446
|
-
this.onDidChangeVisibility = this._onDidChangeVisibility.event;
|
|
1447
|
-
this._isVisible = false;
|
|
1448
|
-
this.mapNotificationToToast = ( (new Map()));
|
|
1449
|
-
this.mapNotificationToDisposable = ( (new Map()));
|
|
1450
|
-
this.notificationsToastsVisibleContextKey = NotificationsToastsVisibleContext.bindTo(this.contextKeyService);
|
|
1451
|
-
this.addedToastsIntervalCounter = ( (new IntervalCounter(NotificationsToasts.SPAM_PROTECTION.interval)));
|
|
1452
|
-
this.registerListeners();
|
|
1453
|
-
}
|
|
1454
|
-
registerListeners() {
|
|
1455
|
-
this._register(this.layoutService.onDidLayout(dimension => this.layout(Dimension.lift(dimension))));
|
|
1456
|
-
this.lifecycleService.when(3 ).then(() => {
|
|
1457
|
-
this.model.notifications.forEach(notification => this.addToast(notification));
|
|
1458
|
-
this._register(this.model.onDidChangeNotification(e => this.onDidChangeNotification(e)));
|
|
1459
|
-
});
|
|
1460
|
-
this._register(this.model.onDidChangeFilter(filter => {
|
|
1461
|
-
if (filter === NotificationsFilter.SILENT || filter === NotificationsFilter.ERROR) {
|
|
1462
|
-
this.hide();
|
|
1463
|
-
}
|
|
1464
|
-
}));
|
|
1465
|
-
}
|
|
1466
|
-
onDidChangeNotification(e) {
|
|
1467
|
-
switch (e.kind) {
|
|
1468
|
-
case 0 :
|
|
1469
|
-
return this.addToast(e.item);
|
|
1470
|
-
case 3 :
|
|
1471
|
-
return this.removeToast(e.item);
|
|
1472
|
-
}
|
|
1473
|
-
}
|
|
1474
|
-
addToast(item) {
|
|
1475
|
-
if (this.isNotificationsCenterVisible) {
|
|
1476
|
-
return;
|
|
1477
|
-
}
|
|
1478
|
-
if (item.priority === NotificationPriority.SILENT) {
|
|
1479
|
-
return;
|
|
1480
|
-
}
|
|
1481
|
-
if (this.addedToastsIntervalCounter.increment() > NotificationsToasts.SPAM_PROTECTION.limit) {
|
|
1482
|
-
return;
|
|
1483
|
-
}
|
|
1484
|
-
const itemDisposables = ( (new DisposableStore()));
|
|
1485
|
-
this.mapNotificationToDisposable.set(item, itemDisposables);
|
|
1486
|
-
itemDisposables.add(scheduleAtNextAnimationFrame(() => this.doAddToast(item, itemDisposables)));
|
|
1487
|
-
}
|
|
1488
|
-
doAddToast(item, itemDisposables) {
|
|
1489
|
-
let notificationsToastsContainer = this.notificationsToastsContainer;
|
|
1490
|
-
if (!notificationsToastsContainer) {
|
|
1491
|
-
notificationsToastsContainer = this.notificationsToastsContainer = document.createElement('div');
|
|
1492
|
-
notificationsToastsContainer.classList.add('notifications-toasts');
|
|
1493
|
-
this.container.appendChild(notificationsToastsContainer);
|
|
1494
|
-
}
|
|
1495
|
-
notificationsToastsContainer.classList.add('visible');
|
|
1496
|
-
const notificationToastContainer = document.createElement('div');
|
|
1497
|
-
notificationToastContainer.classList.add('notification-toast-container');
|
|
1498
|
-
const firstToast = notificationsToastsContainer.firstChild;
|
|
1499
|
-
if (firstToast) {
|
|
1500
|
-
notificationsToastsContainer.insertBefore(notificationToastContainer, firstToast);
|
|
1501
|
-
}
|
|
1502
|
-
else {
|
|
1503
|
-
notificationsToastsContainer.appendChild(notificationToastContainer);
|
|
1504
|
-
}
|
|
1505
|
-
const notificationToast = document.createElement('div');
|
|
1506
|
-
notificationToast.classList.add('notification-toast');
|
|
1507
|
-
notificationToastContainer.appendChild(notificationToast);
|
|
1508
|
-
const notificationList = this.instantiationService.createInstance(NotificationsList, notificationToast, {
|
|
1509
|
-
verticalScrollMode: 2 ,
|
|
1510
|
-
widgetAriaLabel: (() => {
|
|
1511
|
-
if (!item.source) {
|
|
1512
|
-
return (
|
|
1513
|
-
(localize('notificationAriaLabel', "{0}, notification", item.message.raw))
|
|
1514
|
-
);
|
|
1515
|
-
}
|
|
1516
|
-
return (
|
|
1517
|
-
(localize(
|
|
1518
|
-
'notificationWithSourceAriaLabel',
|
|
1519
|
-
"{0}, source: {1}, notification",
|
|
1520
|
-
item.message.raw,
|
|
1521
|
-
item.source
|
|
1522
|
-
))
|
|
1523
|
-
);
|
|
1524
|
-
})()
|
|
1525
|
-
});
|
|
1526
|
-
itemDisposables.add(notificationList);
|
|
1527
|
-
const toast = { item, list: notificationList, container: notificationToastContainer, toast: notificationToast };
|
|
1528
|
-
this.mapNotificationToToast.set(item, toast);
|
|
1529
|
-
itemDisposables.add(toDisposable(() => this.updateToastVisibility(toast, false)));
|
|
1530
|
-
notificationList.show();
|
|
1531
|
-
const maxDimensions = this.computeMaxDimensions();
|
|
1532
|
-
this.layoutLists(maxDimensions.width);
|
|
1533
|
-
notificationList.updateNotificationsList(0, 0, [item]);
|
|
1534
|
-
this.layoutContainer(maxDimensions.height);
|
|
1535
|
-
itemDisposables.add(item.onDidChangeExpansion(() => {
|
|
1536
|
-
notificationList.updateNotificationsList(0, 1, [item]);
|
|
1537
|
-
}));
|
|
1538
|
-
itemDisposables.add(item.onDidChangeContent(e => {
|
|
1539
|
-
switch (e.kind) {
|
|
1540
|
-
case 2 :
|
|
1541
|
-
notificationList.updateNotificationsList(0, 1, [item]);
|
|
1542
|
-
break;
|
|
1543
|
-
case 1 :
|
|
1544
|
-
if (item.expanded) {
|
|
1545
|
-
notificationList.updateNotificationHeight(item);
|
|
1546
|
-
}
|
|
1547
|
-
break;
|
|
1548
|
-
}
|
|
1549
|
-
}));
|
|
1550
|
-
Event.once(item.onDidClose)(() => {
|
|
1551
|
-
this.removeToast(item);
|
|
1552
|
-
});
|
|
1553
|
-
this.purgeNotification(item, notificationToastContainer, notificationList, itemDisposables);
|
|
1554
|
-
this.updateStyles();
|
|
1555
|
-
this.notificationsToastsVisibleContextKey.set(true);
|
|
1556
|
-
notificationToast.classList.add('notification-fade-in');
|
|
1557
|
-
itemDisposables.add(addDisposableListener(notificationToast, 'transitionend', () => {
|
|
1558
|
-
notificationToast.classList.remove('notification-fade-in');
|
|
1559
|
-
notificationToast.classList.add('notification-fade-in-done');
|
|
1560
|
-
}));
|
|
1561
|
-
item.updateVisibility(true);
|
|
1562
|
-
if (!this._isVisible) {
|
|
1563
|
-
this._isVisible = true;
|
|
1564
|
-
this._onDidChangeVisibility.fire();
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
purgeNotification(item, notificationToastContainer, notificationList, disposables) {
|
|
1568
|
-
let isMouseOverToast = false;
|
|
1569
|
-
disposables.add(addDisposableListener(notificationToastContainer, EventType.MOUSE_OVER, () => isMouseOverToast = true));
|
|
1570
|
-
disposables.add(addDisposableListener(notificationToastContainer, EventType.MOUSE_OUT, () => isMouseOverToast = false));
|
|
1571
|
-
let purgeTimeoutHandle;
|
|
1572
|
-
let listener;
|
|
1573
|
-
const hideAfterTimeout = () => {
|
|
1574
|
-
purgeTimeoutHandle = setTimeout(() => {
|
|
1575
|
-
if (!this.hostService.hasFocus) {
|
|
1576
|
-
if (!listener) {
|
|
1577
|
-
listener = this.hostService.onDidChangeFocus(focus => {
|
|
1578
|
-
if (focus) {
|
|
1579
|
-
hideAfterTimeout();
|
|
1580
|
-
}
|
|
1581
|
-
});
|
|
1582
|
-
disposables.add(listener);
|
|
1583
|
-
}
|
|
1584
|
-
}
|
|
1585
|
-
else if (item.sticky ||
|
|
1586
|
-
notificationList.hasFocus() ||
|
|
1587
|
-
isMouseOverToast
|
|
1588
|
-
) {
|
|
1589
|
-
hideAfterTimeout();
|
|
1590
|
-
}
|
|
1591
|
-
else {
|
|
1592
|
-
this.removeToast(item);
|
|
1593
|
-
}
|
|
1594
|
-
}, NotificationsToasts.PURGE_TIMEOUT[item.severity]);
|
|
1595
|
-
};
|
|
1596
|
-
hideAfterTimeout();
|
|
1597
|
-
disposables.add(toDisposable(() => clearTimeout(purgeTimeoutHandle)));
|
|
1598
|
-
}
|
|
1599
|
-
removeToast(item) {
|
|
1600
|
-
let focusEditor = false;
|
|
1601
|
-
const notificationToast = this.mapNotificationToToast.get(item);
|
|
1602
|
-
if (notificationToast) {
|
|
1603
|
-
const toastHasDOMFocus = isAncestor(document.activeElement, notificationToast.container);
|
|
1604
|
-
if (toastHasDOMFocus) {
|
|
1605
|
-
focusEditor = !(this.focusNext() || this.focusPrevious());
|
|
1606
|
-
}
|
|
1607
|
-
this.mapNotificationToToast.delete(item);
|
|
1608
|
-
}
|
|
1609
|
-
const notificationDisposables = this.mapNotificationToDisposable.get(item);
|
|
1610
|
-
if (notificationDisposables) {
|
|
1611
|
-
dispose(notificationDisposables);
|
|
1612
|
-
this.mapNotificationToDisposable.delete(item);
|
|
1613
|
-
}
|
|
1614
|
-
if (this.mapNotificationToToast.size > 0) {
|
|
1615
|
-
this.layout(this.workbenchDimensions);
|
|
1616
|
-
}
|
|
1617
|
-
else {
|
|
1618
|
-
this.doHide();
|
|
1619
|
-
if (focusEditor) {
|
|
1620
|
-
this.editorGroupService.activeGroup.focus();
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
}
|
|
1624
|
-
removeToasts() {
|
|
1625
|
-
this.mapNotificationToToast.clear();
|
|
1626
|
-
this.mapNotificationToDisposable.forEach(disposable => dispose(disposable));
|
|
1627
|
-
this.mapNotificationToDisposable.clear();
|
|
1628
|
-
this.doHide();
|
|
1629
|
-
}
|
|
1630
|
-
doHide() {
|
|
1631
|
-
this.notificationsToastsContainer?.classList.remove('visible');
|
|
1632
|
-
this.notificationsToastsVisibleContextKey.set(false);
|
|
1633
|
-
if (this._isVisible) {
|
|
1634
|
-
this._isVisible = false;
|
|
1635
|
-
this._onDidChangeVisibility.fire();
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
hide() {
|
|
1639
|
-
const focusEditor = this.notificationsToastsContainer ? isAncestor(document.activeElement, this.notificationsToastsContainer) : false;
|
|
1640
|
-
this.removeToasts();
|
|
1641
|
-
if (focusEditor) {
|
|
1642
|
-
this.editorGroupService.activeGroup.focus();
|
|
1643
|
-
}
|
|
1644
|
-
}
|
|
1645
|
-
focus() {
|
|
1646
|
-
const toasts = this.getToasts(ToastVisibility.VISIBLE);
|
|
1647
|
-
if (toasts.length > 0) {
|
|
1648
|
-
toasts[0].list.focusFirst();
|
|
1649
|
-
return true;
|
|
1650
|
-
}
|
|
1651
|
-
return false;
|
|
1652
|
-
}
|
|
1653
|
-
focusNext() {
|
|
1654
|
-
const toasts = this.getToasts(ToastVisibility.VISIBLE);
|
|
1655
|
-
for (let i = 0; i < toasts.length; i++) {
|
|
1656
|
-
const toast = toasts[i];
|
|
1657
|
-
if (toast.list.hasFocus()) {
|
|
1658
|
-
const nextToast = toasts[i + 1];
|
|
1659
|
-
if (nextToast) {
|
|
1660
|
-
nextToast.list.focusFirst();
|
|
1661
|
-
return true;
|
|
1662
|
-
}
|
|
1663
|
-
break;
|
|
1664
|
-
}
|
|
1665
|
-
}
|
|
1666
|
-
return false;
|
|
1667
|
-
}
|
|
1668
|
-
focusPrevious() {
|
|
1669
|
-
const toasts = this.getToasts(ToastVisibility.VISIBLE);
|
|
1670
|
-
for (let i = 0; i < toasts.length; i++) {
|
|
1671
|
-
const toast = toasts[i];
|
|
1672
|
-
if (toast.list.hasFocus()) {
|
|
1673
|
-
const previousToast = toasts[i - 1];
|
|
1674
|
-
if (previousToast) {
|
|
1675
|
-
previousToast.list.focusFirst();
|
|
1676
|
-
return true;
|
|
1677
|
-
}
|
|
1678
|
-
break;
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1681
|
-
return false;
|
|
1682
|
-
}
|
|
1683
|
-
focusFirst() {
|
|
1684
|
-
const toast = this.getToasts(ToastVisibility.VISIBLE)[0];
|
|
1685
|
-
if (toast) {
|
|
1686
|
-
toast.list.focusFirst();
|
|
1687
|
-
return true;
|
|
1688
|
-
}
|
|
1689
|
-
return false;
|
|
1690
|
-
}
|
|
1691
|
-
focusLast() {
|
|
1692
|
-
const toasts = this.getToasts(ToastVisibility.VISIBLE);
|
|
1693
|
-
if (toasts.length > 0) {
|
|
1694
|
-
toasts[toasts.length - 1].list.focusFirst();
|
|
1695
|
-
return true;
|
|
1696
|
-
}
|
|
1697
|
-
return false;
|
|
1698
|
-
}
|
|
1699
|
-
update(isCenterVisible) {
|
|
1700
|
-
if (this.isNotificationsCenterVisible !== isCenterVisible) {
|
|
1701
|
-
this.isNotificationsCenterVisible = isCenterVisible;
|
|
1702
|
-
if (this.isNotificationsCenterVisible) {
|
|
1703
|
-
this.removeToasts();
|
|
1704
|
-
}
|
|
1705
|
-
}
|
|
1706
|
-
}
|
|
1707
|
-
updateStyles() {
|
|
1708
|
-
this.mapNotificationToToast.forEach(({ toast }) => {
|
|
1709
|
-
const backgroundColor = this.getColor(NOTIFICATIONS_BACKGROUND);
|
|
1710
|
-
toast.style.background = backgroundColor ? backgroundColor : '';
|
|
1711
|
-
const widgetShadowColor = this.getColor(widgetShadow);
|
|
1712
|
-
toast.style.boxShadow = widgetShadowColor ? `0 0 8px 2px ${widgetShadowColor}` : '';
|
|
1713
|
-
const borderColor = this.getColor(NOTIFICATIONS_TOAST_BORDER);
|
|
1714
|
-
toast.style.border = borderColor ? `1px solid ${borderColor}` : '';
|
|
1715
|
-
});
|
|
1716
|
-
}
|
|
1717
|
-
getToasts(state) {
|
|
1718
|
-
const notificationToasts = [];
|
|
1719
|
-
this.mapNotificationToToast.forEach(toast => {
|
|
1720
|
-
switch (state) {
|
|
1721
|
-
case ToastVisibility.HIDDEN_OR_VISIBLE:
|
|
1722
|
-
notificationToasts.push(toast);
|
|
1723
|
-
break;
|
|
1724
|
-
case ToastVisibility.HIDDEN:
|
|
1725
|
-
if (!this.isToastInDOM(toast)) {
|
|
1726
|
-
notificationToasts.push(toast);
|
|
1727
|
-
}
|
|
1728
|
-
break;
|
|
1729
|
-
case ToastVisibility.VISIBLE:
|
|
1730
|
-
if (this.isToastInDOM(toast)) {
|
|
1731
|
-
notificationToasts.push(toast);
|
|
1732
|
-
}
|
|
1733
|
-
break;
|
|
1734
|
-
}
|
|
1735
|
-
});
|
|
1736
|
-
return notificationToasts.reverse();
|
|
1737
|
-
}
|
|
1738
|
-
layout(dimension) {
|
|
1739
|
-
this.workbenchDimensions = dimension;
|
|
1740
|
-
const maxDimensions = this.computeMaxDimensions();
|
|
1741
|
-
if (maxDimensions.height) {
|
|
1742
|
-
this.layoutContainer(maxDimensions.height);
|
|
1743
|
-
}
|
|
1744
|
-
this.layoutLists(maxDimensions.width);
|
|
1745
|
-
}
|
|
1746
|
-
computeMaxDimensions() {
|
|
1747
|
-
const maxWidth = NotificationsToasts.MAX_WIDTH;
|
|
1748
|
-
let availableWidth = maxWidth;
|
|
1749
|
-
let availableHeight;
|
|
1750
|
-
if (this.workbenchDimensions) {
|
|
1751
|
-
availableWidth = this.workbenchDimensions.width;
|
|
1752
|
-
availableWidth -= (2 * 8);
|
|
1753
|
-
availableHeight = this.workbenchDimensions.height;
|
|
1754
|
-
if (this.layoutService.isVisible("workbench.parts.statusbar" )) {
|
|
1755
|
-
availableHeight -= 22;
|
|
1756
|
-
}
|
|
1757
|
-
if (this.layoutService.isVisible("workbench.parts.titlebar" )) {
|
|
1758
|
-
availableHeight -= 22;
|
|
1759
|
-
}
|
|
1760
|
-
availableHeight -= (2 * 12);
|
|
1761
|
-
}
|
|
1762
|
-
availableHeight = typeof availableHeight === 'number'
|
|
1763
|
-
? Math.round(availableHeight * 0.618)
|
|
1764
|
-
: 0;
|
|
1765
|
-
return (
|
|
1766
|
-
(new Dimension(Math.min(maxWidth, availableWidth), availableHeight))
|
|
1767
|
-
);
|
|
1768
|
-
}
|
|
1769
|
-
layoutLists(width) {
|
|
1770
|
-
this.mapNotificationToToast.forEach(({ list }) => list.layout(width));
|
|
1771
|
-
}
|
|
1772
|
-
layoutContainer(heightToGive) {
|
|
1773
|
-
let visibleToasts = 0;
|
|
1774
|
-
for (const toast of this.getToasts(ToastVisibility.HIDDEN_OR_VISIBLE)) {
|
|
1775
|
-
toast.container.style.opacity = '0';
|
|
1776
|
-
this.updateToastVisibility(toast, true);
|
|
1777
|
-
heightToGive -= toast.container.offsetHeight;
|
|
1778
|
-
let makeVisible = false;
|
|
1779
|
-
if (visibleToasts === NotificationsToasts.MAX_NOTIFICATIONS) {
|
|
1780
|
-
makeVisible = false;
|
|
1781
|
-
}
|
|
1782
|
-
else if (heightToGive >= 0) {
|
|
1783
|
-
makeVisible = true;
|
|
1784
|
-
}
|
|
1785
|
-
this.updateToastVisibility(toast, makeVisible);
|
|
1786
|
-
toast.container.style.opacity = '';
|
|
1787
|
-
if (makeVisible) {
|
|
1788
|
-
visibleToasts++;
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1792
|
-
updateToastVisibility(toast, visible) {
|
|
1793
|
-
if (this.isToastInDOM(toast) === visible) {
|
|
1794
|
-
return;
|
|
1795
|
-
}
|
|
1796
|
-
const notificationsToastsContainer = assertIsDefined(this.notificationsToastsContainer);
|
|
1797
|
-
if (visible) {
|
|
1798
|
-
notificationsToastsContainer.appendChild(toast.container);
|
|
1799
|
-
}
|
|
1800
|
-
else {
|
|
1801
|
-
notificationsToastsContainer.removeChild(toast.container);
|
|
1802
|
-
}
|
|
1803
|
-
toast.item.updateVisibility(visible);
|
|
1804
|
-
}
|
|
1805
|
-
isToastInDOM(toast) {
|
|
1806
|
-
return !!toast.container.parentElement;
|
|
1807
|
-
}
|
|
1808
|
-
};
|
|
1809
|
-
NotificationsToasts.MAX_WIDTH = 450;
|
|
1810
|
-
NotificationsToasts.MAX_NOTIFICATIONS = 3;
|
|
1811
|
-
NotificationsToasts.PURGE_TIMEOUT = {
|
|
1812
|
-
[Severity.Info]: 15000,
|
|
1813
|
-
[Severity.Warning]: 18000,
|
|
1814
|
-
[Severity.Error]: 20000
|
|
1815
|
-
};
|
|
1816
|
-
NotificationsToasts.SPAM_PROTECTION = {
|
|
1817
|
-
interval: 800,
|
|
1818
|
-
limit: NotificationsToasts.MAX_NOTIFICATIONS
|
|
1819
|
-
};
|
|
1820
|
-
NotificationsToasts = ( (__decorate([
|
|
1821
|
-
( (__param(2, IInstantiationService))),
|
|
1822
|
-
( (__param(3, IWorkbenchLayoutService))),
|
|
1823
|
-
( (__param(4, IThemeService))),
|
|
1824
|
-
( (__param(5, IEditorGroupsService))),
|
|
1825
|
-
( (__param(6, IContextKeyService))),
|
|
1826
|
-
( (__param(7, ILifecycleService))),
|
|
1827
|
-
( (__param(8, IHostService)))
|
|
1828
|
-
], NotificationsToasts)));
|
|
1829
|
-
let NotificationService = class NotificationService extends Disposable {
|
|
1830
|
-
constructor(storageService) {
|
|
1831
|
-
super();
|
|
1832
|
-
this.storageService = storageService;
|
|
1833
|
-
this.model = this._register(( (new NotificationsModel())));
|
|
1834
|
-
this._onDidAddNotification = this._register(( (new Emitter())));
|
|
1835
|
-
this.onDidAddNotification = this._onDidAddNotification.event;
|
|
1836
|
-
this._onDidRemoveNotification = this._register(( (new Emitter())));
|
|
1837
|
-
this.onDidRemoveNotification = this._onDidRemoveNotification.event;
|
|
1838
|
-
this._onDidChangeDoNotDisturbMode = this._register(( (new Emitter())));
|
|
1839
|
-
this.onDidChangeDoNotDisturbMode = this._onDidChangeDoNotDisturbMode.event;
|
|
1840
|
-
this._doNotDisturbMode = this.storageService.getBoolean(NotificationService.DND_SETTINGS_KEY, -1 , false);
|
|
1841
|
-
this.updateDoNotDisturbFilters();
|
|
1842
|
-
this.registerListeners();
|
|
1843
|
-
}
|
|
1844
|
-
registerListeners() {
|
|
1845
|
-
this._register(this.model.onDidChangeNotification(e => {
|
|
1846
|
-
switch (e.kind) {
|
|
1847
|
-
case 0 :
|
|
1848
|
-
case 3 : {
|
|
1849
|
-
const notification = {
|
|
1850
|
-
message: e.item.message.original,
|
|
1851
|
-
severity: e.item.severity,
|
|
1852
|
-
source: typeof e.item.sourceId === 'string' && typeof e.item.source === 'string' ? { id: e.item.sourceId, label: e.item.source } : e.item.source,
|
|
1853
|
-
priority: e.item.priority
|
|
1854
|
-
};
|
|
1855
|
-
if (e.kind === 0 ) {
|
|
1856
|
-
this._onDidAddNotification.fire(notification);
|
|
1857
|
-
}
|
|
1858
|
-
if (e.kind === 3 ) {
|
|
1859
|
-
this._onDidRemoveNotification.fire(notification);
|
|
1860
|
-
}
|
|
1861
|
-
break;
|
|
1862
|
-
}
|
|
1863
|
-
}
|
|
1864
|
-
}));
|
|
1865
|
-
}
|
|
1866
|
-
get doNotDisturbMode() {
|
|
1867
|
-
return this._doNotDisturbMode;
|
|
1868
|
-
}
|
|
1869
|
-
set doNotDisturbMode(enabled) {
|
|
1870
|
-
if (this._doNotDisturbMode === enabled) {
|
|
1871
|
-
return;
|
|
1872
|
-
}
|
|
1873
|
-
this.storageService.store(NotificationService.DND_SETTINGS_KEY, enabled, -1 , 1 );
|
|
1874
|
-
this._doNotDisturbMode = enabled;
|
|
1875
|
-
this.updateDoNotDisturbFilters();
|
|
1876
|
-
this._onDidChangeDoNotDisturbMode.fire();
|
|
1877
|
-
}
|
|
1878
|
-
updateDoNotDisturbFilters() {
|
|
1879
|
-
let filter;
|
|
1880
|
-
if (this._doNotDisturbMode) {
|
|
1881
|
-
filter = NotificationsFilter.ERROR;
|
|
1882
|
-
}
|
|
1883
|
-
else {
|
|
1884
|
-
filter = NotificationsFilter.OFF;
|
|
1885
|
-
}
|
|
1886
|
-
this.model.setFilter(filter);
|
|
1887
|
-
}
|
|
1888
|
-
info(message) {
|
|
1889
|
-
if (Array.isArray(message)) {
|
|
1890
|
-
message.forEach(m => this.info(m));
|
|
1891
|
-
return;
|
|
1892
|
-
}
|
|
1893
|
-
this.model.addNotification({ severity: Severity.Info, message });
|
|
1894
|
-
}
|
|
1895
|
-
warn(message) {
|
|
1896
|
-
if (Array.isArray(message)) {
|
|
1897
|
-
message.forEach(m => this.warn(m));
|
|
1898
|
-
return;
|
|
1899
|
-
}
|
|
1900
|
-
this.model.addNotification({ severity: Severity.Warning, message });
|
|
1901
|
-
}
|
|
1902
|
-
error(message) {
|
|
1903
|
-
if (Array.isArray(message)) {
|
|
1904
|
-
message.forEach(m => this.error(m));
|
|
1905
|
-
return;
|
|
1906
|
-
}
|
|
1907
|
-
this.model.addNotification({ severity: Severity.Error, message });
|
|
1908
|
-
}
|
|
1909
|
-
notify(notification) {
|
|
1910
|
-
const toDispose = ( (new DisposableStore()));
|
|
1911
|
-
if (notification.neverShowAgain) {
|
|
1912
|
-
const scope = this.toStorageScope(notification.neverShowAgain);
|
|
1913
|
-
const id = notification.neverShowAgain.id;
|
|
1914
|
-
if (this.storageService.getBoolean(id, scope)) {
|
|
1915
|
-
return (
|
|
1916
|
-
(new NoOpNotification())
|
|
1917
|
-
);
|
|
1918
|
-
}
|
|
1919
|
-
const neverShowAgainAction = toDispose.add(( (new Action(
|
|
1920
|
-
'workbench.notification.neverShowAgain',
|
|
1921
|
-
(localize('neverShowAgain', "Don't Show Again")),
|
|
1922
|
-
undefined,
|
|
1923
|
-
true,
|
|
1924
|
-
async () => {
|
|
1925
|
-
handle.close();
|
|
1926
|
-
this.storageService.store(id, true, scope, 0 );
|
|
1927
|
-
}
|
|
1928
|
-
))));
|
|
1929
|
-
const actions = {
|
|
1930
|
-
primary: notification.actions?.primary || [],
|
|
1931
|
-
secondary: notification.actions?.secondary || []
|
|
1932
|
-
};
|
|
1933
|
-
if (!notification.neverShowAgain.isSecondary) {
|
|
1934
|
-
actions.primary = [neverShowAgainAction, ...actions.primary];
|
|
1935
|
-
}
|
|
1936
|
-
else {
|
|
1937
|
-
actions.secondary = [...actions.secondary, neverShowAgainAction];
|
|
1938
|
-
}
|
|
1939
|
-
notification.actions = actions;
|
|
1940
|
-
}
|
|
1941
|
-
const handle = this.model.addNotification(notification);
|
|
1942
|
-
Event.once(handle.onDidClose)(() => toDispose.dispose());
|
|
1943
|
-
return handle;
|
|
1944
|
-
}
|
|
1945
|
-
toStorageScope(options) {
|
|
1946
|
-
switch (options.scope) {
|
|
1947
|
-
case NeverShowAgainScope.APPLICATION:
|
|
1948
|
-
return -1 ;
|
|
1949
|
-
case NeverShowAgainScope.PROFILE:
|
|
1950
|
-
return 0 ;
|
|
1951
|
-
case NeverShowAgainScope.WORKSPACE:
|
|
1952
|
-
return 1 ;
|
|
1953
|
-
default:
|
|
1954
|
-
return -1 ;
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
prompt(severity, message, choices, options) {
|
|
1958
|
-
const toDispose = ( (new DisposableStore()));
|
|
1959
|
-
if (options?.neverShowAgain) {
|
|
1960
|
-
const scope = this.toStorageScope(options.neverShowAgain);
|
|
1961
|
-
const id = options.neverShowAgain.id;
|
|
1962
|
-
if (this.storageService.getBoolean(id, scope)) {
|
|
1963
|
-
return (
|
|
1964
|
-
(new NoOpNotification())
|
|
1965
|
-
);
|
|
1966
|
-
}
|
|
1967
|
-
const neverShowAgainChoice = {
|
|
1968
|
-
label: ( (localize('neverShowAgain', "Don't Show Again"))),
|
|
1969
|
-
run: () => this.storageService.store(id, true, scope, 0 ),
|
|
1970
|
-
isSecondary: options.neverShowAgain.isSecondary
|
|
1971
|
-
};
|
|
1972
|
-
if (!options.neverShowAgain.isSecondary) {
|
|
1973
|
-
choices = [neverShowAgainChoice, ...choices];
|
|
1974
|
-
}
|
|
1975
|
-
else {
|
|
1976
|
-
choices = [...choices, neverShowAgainChoice];
|
|
1977
|
-
}
|
|
1978
|
-
}
|
|
1979
|
-
let choiceClicked = false;
|
|
1980
|
-
const primaryActions = [];
|
|
1981
|
-
const secondaryActions = [];
|
|
1982
|
-
choices.forEach((choice, index) => {
|
|
1983
|
-
const action = ( (new ChoiceAction(`workbench.dialog.choice.${index}`, choice)));
|
|
1984
|
-
if (!choice.isSecondary) {
|
|
1985
|
-
primaryActions.push(action);
|
|
1986
|
-
}
|
|
1987
|
-
else {
|
|
1988
|
-
secondaryActions.push(action);
|
|
1989
|
-
}
|
|
1990
|
-
toDispose.add(action.onDidRun(() => {
|
|
1991
|
-
choiceClicked = true;
|
|
1992
|
-
if (!choice.keepOpen) {
|
|
1993
|
-
handle.close();
|
|
1994
|
-
}
|
|
1995
|
-
}));
|
|
1996
|
-
toDispose.add(action);
|
|
1997
|
-
});
|
|
1998
|
-
const actions = { primary: primaryActions, secondary: secondaryActions };
|
|
1999
|
-
const handle = this.notify({ severity, message, actions, sticky: options?.sticky, priority: options?.priority });
|
|
2000
|
-
Event.once(handle.onDidClose)(() => {
|
|
2001
|
-
toDispose.dispose();
|
|
2002
|
-
if (options && typeof options.onCancel === 'function' && !choiceClicked) {
|
|
2003
|
-
options.onCancel();
|
|
2004
|
-
}
|
|
2005
|
-
});
|
|
2006
|
-
return handle;
|
|
2007
|
-
}
|
|
2008
|
-
status(message, options) {
|
|
2009
|
-
return this.model.showStatusMessage(message, options);
|
|
2010
|
-
}
|
|
2011
|
-
};
|
|
2012
|
-
NotificationService.DND_SETTINGS_KEY = 'notifications.doNotDisturbMode';
|
|
2013
|
-
NotificationService = ( (__decorate([
|
|
2014
|
-
( (__param(0, IStorageService)))
|
|
2015
|
-
], NotificationService)));
|
|
2016
|
-
var css = ".monaco-workbench>.notifications-center{border-radius:4px;bottom:31px;display:none;overflow:hidden;position:absolute;right:8px;z-index:1000}.monaco-workbench.nostatusbar>.notifications-center{bottom:8px}.monaco-workbench>.notifications-center.visible{display:block}.monaco-workbench>.notifications-center>.notifications-center-header{align-items:center;display:flex;height:35px;padding-left:8px;padding-right:5px}.monaco-workbench>.notifications-center>.notifications-center-header>.notifications-center-header-title{font-size:11px;text-transform:uppercase}.monaco-workbench>.notifications-center>.notifications-center-header>.notifications-center-header-toolbar{flex:1}.monaco-workbench>.notifications-center>.notifications-center-header>.notifications-center-header-toolbar .actions-container{justify-content:flex-end}.monaco-workbench>.notifications-center .notifications-list-container .monaco-list-row[data-last-element=false]>.notification-list-item{border-bottom:1px solid var(--vscode-notifications-border)}.monaco-workbench>.notifications-center .notifications-list-container,.monaco-workbench>.notifications-center .notifications-list-container .monaco-scrollable-element,.monaco-workbench>.notifications-center .notifications-list-container .notification-list-item{border-radius:0}.monaco-workbench>.notifications-center .codicon.codicon-error{color:var(--vscode-notificationsErrorIcon-foreground)}.monaco-workbench>.notifications-center .codicon.codicon-warning{color:var(--vscode-notificationsWarningIcon-foreground)}.monaco-workbench>.notifications-center .codicon.codicon-info{color:var(--vscode-notificationsInfoIcon-foreground)}";
|
|
2017
|
-
n(css,{});
|
|
2018
|
-
let NotificationsCenter = class NotificationsCenter extends Themable {
|
|
2019
|
-
constructor(container, model, themeService, instantiationService, layoutService, contextKeyService, editorGroupService, keybindingService, notificationService) {
|
|
2020
|
-
super(themeService);
|
|
2021
|
-
this.container = container;
|
|
2022
|
-
this.model = model;
|
|
2023
|
-
this.instantiationService = instantiationService;
|
|
2024
|
-
this.layoutService = layoutService;
|
|
2025
|
-
this.contextKeyService = contextKeyService;
|
|
2026
|
-
this.editorGroupService = editorGroupService;
|
|
2027
|
-
this.keybindingService = keybindingService;
|
|
2028
|
-
this.notificationService = notificationService;
|
|
2029
|
-
this._onDidChangeVisibility = this._register(( (new Emitter())));
|
|
2030
|
-
this.onDidChangeVisibility = this._onDidChangeVisibility.event;
|
|
2031
|
-
this.notificationsCenterVisibleContextKey = NotificationsCenterVisibleContext.bindTo(this.contextKeyService);
|
|
2032
|
-
this.notificationsCenterVisibleContextKey = NotificationsCenterVisibleContext.bindTo(contextKeyService);
|
|
2033
|
-
this.registerListeners();
|
|
2034
|
-
}
|
|
2035
|
-
registerListeners() {
|
|
2036
|
-
this._register(this.model.onDidChangeNotification(e => this.onDidChangeNotification(e)));
|
|
2037
|
-
this._register(this.layoutService.onDidLayout(dimension => this.layout(Dimension.lift(dimension))));
|
|
2038
|
-
this._register(this.notificationService.onDidChangeDoNotDisturbMode(() => this.onDidChangeDoNotDisturbMode()));
|
|
2039
|
-
}
|
|
2040
|
-
onDidChangeDoNotDisturbMode() {
|
|
2041
|
-
this.hide();
|
|
2042
|
-
}
|
|
2043
|
-
get isVisible() {
|
|
2044
|
-
return !!this._isVisible;
|
|
2045
|
-
}
|
|
2046
|
-
show() {
|
|
2047
|
-
if (this._isVisible) {
|
|
2048
|
-
const notificationsList = assertIsDefined(this.notificationsList);
|
|
2049
|
-
notificationsList.show(true );
|
|
2050
|
-
return;
|
|
2051
|
-
}
|
|
2052
|
-
if (!this.notificationsCenterContainer) {
|
|
2053
|
-
this.create();
|
|
2054
|
-
}
|
|
2055
|
-
this.updateTitle();
|
|
2056
|
-
const [notificationsList, notificationsCenterContainer] = assertAllDefined(this.notificationsList, this.notificationsCenterContainer);
|
|
2057
|
-
this._isVisible = true;
|
|
2058
|
-
notificationsCenterContainer.classList.add('visible');
|
|
2059
|
-
notificationsList.show();
|
|
2060
|
-
this.layout(this.workbenchDimensions);
|
|
2061
|
-
notificationsList.updateNotificationsList(0, 0, this.model.notifications);
|
|
2062
|
-
notificationsList.focusFirst();
|
|
2063
|
-
this.updateStyles();
|
|
2064
|
-
this.model.notifications.forEach(notification => notification.updateVisibility(true));
|
|
2065
|
-
this.notificationsCenterVisibleContextKey.set(true);
|
|
2066
|
-
this._onDidChangeVisibility.fire();
|
|
2067
|
-
}
|
|
2068
|
-
updateTitle() {
|
|
2069
|
-
const [notificationsCenterTitle, clearAllAction] = assertAllDefined(this.notificationsCenterTitle, this.clearAllAction);
|
|
2070
|
-
if (this.model.notifications.length === 0) {
|
|
2071
|
-
notificationsCenterTitle.textContent = ( (localize('notificationsEmpty', "No new notifications")));
|
|
2072
|
-
clearAllAction.enabled = false;
|
|
2073
|
-
}
|
|
2074
|
-
else {
|
|
2075
|
-
notificationsCenterTitle.textContent = ( (localize('notifications', "Notifications")));
|
|
2076
|
-
clearAllAction.enabled = this.model.notifications.some(notification => !notification.hasProgress);
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
create() {
|
|
2080
|
-
this.notificationsCenterContainer = document.createElement('div');
|
|
2081
|
-
this.notificationsCenterContainer.classList.add('notifications-center');
|
|
2082
|
-
this.notificationsCenterHeader = document.createElement('div');
|
|
2083
|
-
this.notificationsCenterHeader.classList.add('notifications-center-header');
|
|
2084
|
-
this.notificationsCenterContainer.appendChild(this.notificationsCenterHeader);
|
|
2085
|
-
this.notificationsCenterTitle = document.createElement('span');
|
|
2086
|
-
this.notificationsCenterTitle.classList.add('notifications-center-header-title');
|
|
2087
|
-
this.notificationsCenterHeader.appendChild(this.notificationsCenterTitle);
|
|
2088
|
-
const toolbarContainer = document.createElement('div');
|
|
2089
|
-
toolbarContainer.classList.add('notifications-center-header-toolbar');
|
|
2090
|
-
this.notificationsCenterHeader.appendChild(toolbarContainer);
|
|
2091
|
-
const actionRunner = this._register(this.instantiationService.createInstance(NotificationActionRunner));
|
|
2092
|
-
const notificationsToolBar = this._register(( (new ActionBar(toolbarContainer, {
|
|
2093
|
-
ariaLabel: ( (localize('notificationsToolbar', "Notification Center Actions"))),
|
|
2094
|
-
actionRunner
|
|
2095
|
-
}))));
|
|
2096
|
-
this.clearAllAction = this._register(this.instantiationService.createInstance(ClearAllNotificationsAction, ClearAllNotificationsAction.ID, ClearAllNotificationsAction.LABEL));
|
|
2097
|
-
notificationsToolBar.push(this.clearAllAction, { icon: true, label: false, keybinding: this.getKeybindingLabel(this.clearAllAction) });
|
|
2098
|
-
this.toggleDoNotDisturbAction = this._register(this.instantiationService.createInstance(ToggleDoNotDisturbAction, ToggleDoNotDisturbAction.ID, ToggleDoNotDisturbAction.LABEL));
|
|
2099
|
-
notificationsToolBar.push(this.toggleDoNotDisturbAction, { icon: true, label: false, keybinding: this.getKeybindingLabel(this.toggleDoNotDisturbAction) });
|
|
2100
|
-
const hideAllAction = this._register(this.instantiationService.createInstance(HideNotificationsCenterAction, HideNotificationsCenterAction.ID, HideNotificationsCenterAction.LABEL));
|
|
2101
|
-
notificationsToolBar.push(hideAllAction, { icon: true, label: false, keybinding: this.getKeybindingLabel(hideAllAction) });
|
|
2102
|
-
this.notificationsList = this.instantiationService.createInstance(NotificationsList, this.notificationsCenterContainer, {
|
|
2103
|
-
widgetAriaLabel: ( (localize('notificationsCenterWidgetAriaLabel', "Notifications Center")))
|
|
2104
|
-
});
|
|
2105
|
-
this.container.appendChild(this.notificationsCenterContainer);
|
|
2106
|
-
}
|
|
2107
|
-
getKeybindingLabel(action) {
|
|
2108
|
-
const keybinding = this.keybindingService.lookupKeybinding(action.id);
|
|
2109
|
-
return keybinding ? keybinding.getLabel() : null;
|
|
2110
|
-
}
|
|
2111
|
-
onDidChangeNotification(e) {
|
|
2112
|
-
if (!this._isVisible) {
|
|
2113
|
-
return;
|
|
2114
|
-
}
|
|
2115
|
-
let focusEditor = false;
|
|
2116
|
-
const [notificationsList, notificationsCenterContainer] = assertAllDefined(this.notificationsList, this.notificationsCenterContainer);
|
|
2117
|
-
switch (e.kind) {
|
|
2118
|
-
case 0 :
|
|
2119
|
-
notificationsList.updateNotificationsList(e.index, 0, [e.item]);
|
|
2120
|
-
e.item.updateVisibility(true);
|
|
2121
|
-
break;
|
|
2122
|
-
case 1 :
|
|
2123
|
-
switch (e.detail) {
|
|
2124
|
-
case 2 :
|
|
2125
|
-
notificationsList.updateNotificationsList(e.index, 1, [e.item]);
|
|
2126
|
-
break;
|
|
2127
|
-
case 1 :
|
|
2128
|
-
if (e.item.expanded) {
|
|
2129
|
-
notificationsList.updateNotificationHeight(e.item);
|
|
2130
|
-
}
|
|
2131
|
-
break;
|
|
2132
|
-
}
|
|
2133
|
-
break;
|
|
2134
|
-
case 2 :
|
|
2135
|
-
notificationsList.updateNotificationsList(e.index, 1, [e.item]);
|
|
2136
|
-
break;
|
|
2137
|
-
case 3 :
|
|
2138
|
-
focusEditor = isAncestor(document.activeElement, notificationsCenterContainer);
|
|
2139
|
-
notificationsList.updateNotificationsList(e.index, 1);
|
|
2140
|
-
e.item.updateVisibility(false);
|
|
2141
|
-
break;
|
|
2142
|
-
}
|
|
2143
|
-
this.updateTitle();
|
|
2144
|
-
if (this.model.notifications.length === 0) {
|
|
2145
|
-
this.hide();
|
|
2146
|
-
if (focusEditor) {
|
|
2147
|
-
this.editorGroupService.activeGroup.focus();
|
|
2148
|
-
}
|
|
2149
|
-
}
|
|
2150
|
-
}
|
|
2151
|
-
hide() {
|
|
2152
|
-
if (!this._isVisible || !this.notificationsCenterContainer || !this.notificationsList) {
|
|
2153
|
-
return;
|
|
2154
|
-
}
|
|
2155
|
-
const focusEditor = isAncestor(document.activeElement, this.notificationsCenterContainer);
|
|
2156
|
-
this._isVisible = false;
|
|
2157
|
-
this.notificationsCenterContainer.classList.remove('visible');
|
|
2158
|
-
this.notificationsList.hide();
|
|
2159
|
-
this.model.notifications.forEach(notification => notification.updateVisibility(false));
|
|
2160
|
-
this.notificationsCenterVisibleContextKey.set(false);
|
|
2161
|
-
this._onDidChangeVisibility.fire();
|
|
2162
|
-
if (focusEditor) {
|
|
2163
|
-
this.editorGroupService.activeGroup.focus();
|
|
2164
|
-
}
|
|
2165
|
-
}
|
|
2166
|
-
updateStyles() {
|
|
2167
|
-
if (this.notificationsCenterContainer && this.notificationsCenterHeader) {
|
|
2168
|
-
const widgetShadowColor = this.getColor(widgetShadow);
|
|
2169
|
-
this.notificationsCenterContainer.style.boxShadow = widgetShadowColor ? `0 0 8px 2px ${widgetShadowColor}` : '';
|
|
2170
|
-
const borderColor = this.getColor(NOTIFICATIONS_CENTER_BORDER);
|
|
2171
|
-
this.notificationsCenterContainer.style.border = borderColor ? `1px solid ${borderColor}` : '';
|
|
2172
|
-
const headerForeground = this.getColor(NOTIFICATIONS_CENTER_HEADER_FOREGROUND);
|
|
2173
|
-
this.notificationsCenterHeader.style.color = headerForeground ?? '';
|
|
2174
|
-
const headerBackground = this.getColor(NOTIFICATIONS_CENTER_HEADER_BACKGROUND);
|
|
2175
|
-
this.notificationsCenterHeader.style.background = headerBackground ?? '';
|
|
2176
|
-
}
|
|
2177
|
-
}
|
|
2178
|
-
layout(dimension) {
|
|
2179
|
-
this.workbenchDimensions = dimension;
|
|
2180
|
-
if (this._isVisible && this.notificationsCenterContainer) {
|
|
2181
|
-
const maxWidth = NotificationsCenter.MAX_DIMENSIONS.width;
|
|
2182
|
-
const maxHeight = NotificationsCenter.MAX_DIMENSIONS.height;
|
|
2183
|
-
let availableWidth = maxWidth;
|
|
2184
|
-
let availableHeight = maxHeight;
|
|
2185
|
-
if (this.workbenchDimensions) {
|
|
2186
|
-
availableWidth = this.workbenchDimensions.width;
|
|
2187
|
-
availableWidth -= (2 * 8);
|
|
2188
|
-
availableHeight = this.workbenchDimensions.height - 35 ;
|
|
2189
|
-
if (this.layoutService.isVisible("workbench.parts.statusbar" )) {
|
|
2190
|
-
availableHeight -= 22;
|
|
2191
|
-
}
|
|
2192
|
-
if (this.layoutService.isVisible("workbench.parts.titlebar" )) {
|
|
2193
|
-
availableHeight -= 22;
|
|
2194
|
-
}
|
|
2195
|
-
availableHeight -= (2 * 12);
|
|
2196
|
-
}
|
|
2197
|
-
const notificationsList = assertIsDefined(this.notificationsList);
|
|
2198
|
-
notificationsList.layout(Math.min(maxWidth, availableWidth), Math.min(maxHeight, availableHeight));
|
|
2199
|
-
}
|
|
2200
|
-
}
|
|
2201
|
-
clearAll() {
|
|
2202
|
-
this.hide();
|
|
2203
|
-
for (const notification of [...this.model.notifications] ) {
|
|
2204
|
-
if (!notification.hasProgress) {
|
|
2205
|
-
notification.close();
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
}
|
|
2209
|
-
};
|
|
2210
|
-
NotificationsCenter.MAX_DIMENSIONS = ( (new Dimension(450, 400)));
|
|
2211
|
-
NotificationsCenter = ( (__decorate([
|
|
2212
|
-
( (__param(2, IThemeService))),
|
|
2213
|
-
( (__param(3, IInstantiationService))),
|
|
2214
|
-
( (__param(4, IWorkbenchLayoutService))),
|
|
2215
|
-
( (__param(5, IContextKeyService))),
|
|
2216
|
-
( (__param(6, IEditorGroupsService))),
|
|
2217
|
-
( (__param(7, IKeybindingService))),
|
|
2218
|
-
( (__param(8, INotificationService)))
|
|
2219
|
-
], NotificationsCenter)));
|
|
2220
|
-
class NotificationsAlerts extends Disposable {
|
|
2221
|
-
constructor(model) {
|
|
2222
|
-
super();
|
|
2223
|
-
this.model = model;
|
|
2224
|
-
for (const notification of model.notifications) {
|
|
2225
|
-
this.triggerAriaAlert(notification);
|
|
2226
|
-
}
|
|
2227
|
-
this.registerListeners();
|
|
2228
|
-
}
|
|
2229
|
-
registerListeners() {
|
|
2230
|
-
this._register(this.model.onDidChangeNotification(e => this.onDidChangeNotification(e)));
|
|
2231
|
-
}
|
|
2232
|
-
onDidChangeNotification(e) {
|
|
2233
|
-
if (e.kind === 0 ) {
|
|
2234
|
-
this.triggerAriaAlert(e.item);
|
|
2235
|
-
if (e.item.severity === Severity.Error) {
|
|
2236
|
-
if (e.item.message.original instanceof Error) {
|
|
2237
|
-
console.error(e.item.message.original);
|
|
2238
|
-
}
|
|
2239
|
-
else {
|
|
2240
|
-
console.error(toErrorMessage(( (e.item.message.linkedText.toString())), true));
|
|
2241
|
-
}
|
|
2242
|
-
}
|
|
2243
|
-
}
|
|
2244
|
-
}
|
|
2245
|
-
triggerAriaAlert(notification) {
|
|
2246
|
-
if (notification.priority === NotificationPriority.SILENT) {
|
|
2247
|
-
return;
|
|
2248
|
-
}
|
|
2249
|
-
const listener = notification.onDidChangeContent(e => {
|
|
2250
|
-
if (e.kind === 1 ) {
|
|
2251
|
-
this.doTriggerAriaAlert(notification);
|
|
2252
|
-
}
|
|
2253
|
-
});
|
|
2254
|
-
Event.once(notification.onDidClose)(() => listener.dispose());
|
|
2255
|
-
this.doTriggerAriaAlert(notification);
|
|
2256
|
-
}
|
|
2257
|
-
doTriggerAriaAlert(notification) {
|
|
2258
|
-
let alertText;
|
|
2259
|
-
if (notification.severity === Severity.Error) {
|
|
2260
|
-
alertText = ( (localize(
|
|
2261
|
-
'alertErrorMessage',
|
|
2262
|
-
"Error: {0}",
|
|
2263
|
-
(notification.message.linkedText.toString())
|
|
2264
|
-
)));
|
|
2265
|
-
}
|
|
2266
|
-
else if (notification.severity === Severity.Warning) {
|
|
2267
|
-
alertText = ( (localize(
|
|
2268
|
-
'alertWarningMessage',
|
|
2269
|
-
"Warning: {0}",
|
|
2270
|
-
(notification.message.linkedText.toString())
|
|
2271
|
-
)));
|
|
2272
|
-
}
|
|
2273
|
-
else {
|
|
2274
|
-
alertText = ( (localize(
|
|
2275
|
-
'alertInfoMessage',
|
|
2276
|
-
"Info: {0}",
|
|
2277
|
-
(notification.message.linkedText.toString())
|
|
2278
|
-
)));
|
|
2279
|
-
}
|
|
2280
|
-
alert(alertText);
|
|
2281
|
-
}
|
|
2282
|
-
}
|
|
2283
|
-
onRenderWorkbench(async (accessor) => {
|
|
2284
|
-
const container = accessor.get(ILayoutService).container;
|
|
2285
|
-
const model = accessor.get(INotificationService).model;
|
|
2286
|
-
const instantiationService = accessor.get(IInstantiationService);
|
|
2287
|
-
setTimeout(() => {
|
|
2288
|
-
const notificationsCenter = instantiationService.createInstance(NotificationsCenter, container, model);
|
|
2289
|
-
const notificationsToasts = instantiationService.createInstance(NotificationsToasts, container, model);
|
|
2290
|
-
instantiationService.createInstance(NotificationsAlerts, model);
|
|
2291
|
-
instantiationService.createInstance(NotificationsTelemetry);
|
|
2292
|
-
registerNotificationCommands(notificationsCenter, notificationsToasts, model);
|
|
2293
|
-
notificationsToasts.layout(getClientArea(container));
|
|
2294
|
-
});
|
|
2295
|
-
});
|
|
2296
|
-
function getServiceOverride(container) {
|
|
2297
|
-
return {
|
|
2298
|
-
[( INotificationService.toString())]: new SyncDescriptor(NotificationService, undefined, true),
|
|
2299
|
-
...getServiceOverride$1(container)
|
|
2300
|
-
};
|
|
2301
|
-
}
|
|
2302
|
-
export { getServiceOverride as default };
|