diff --git a/src/vs/platform/contextview/browser/contextMenuHandler.ts b/src/vs/platform/contextview/browser/contextMenuHandler.ts index 1788290ccda52c073465f50bf9b47cebdd6add4d..0b515dc515d4aa862850d4ae6cd392775a5b8f8f 100644 --- a/src/vs/platform/contextview/browser/contextMenuHandler.ts +++ b/src/vs/platform/contextview/browser/contextMenuHandler.ts @@ -158,7 +158,7 @@ export class ContextMenuHandler { } private onDidActionRun(e: IRunEvent): void { - if (e.error && this.notificationService) { + if (e.error) { this.notificationService.error(e.error); } } diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index 2cb90672de523d1d2de8da2b77c8d15d7958973c..f9fd2d5716473fb2250945c94742e2352ad908c8 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -23,7 +23,6 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { CommandsRegistry, ICommandHandler } from 'vs/platform/commands/common/commands'; import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { ActiveGroupEditorsByMostRecentlyUsedQuickAccess } from 'vs/workbench/browser/parts/editor/editorQuickAccess'; -import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import { ITextEditorOptions } from 'vs/platform/editor/common/editor'; import { openEditorWith } from 'vs/workbench/services/editor/common/editorOpenWith'; @@ -901,24 +900,10 @@ function registerOtherEditorCommands(): void { id: TOGGLE_KEEP_EDITORS_COMMAND_ID, handler: accessor => { const configurationService = accessor.get(IConfigurationService); - const notificationService = accessor.get(INotificationService); - const openerService = accessor.get(IOpenerService); - // Update setting const currentSetting = configurationService.getValue('workbench.editor.enablePreview'); const newSetting = currentSetting === true ? false : true; configurationService.updateValue('workbench.editor.enablePreview', newSetting); - - // Inform user - notificationService.prompt( - Severity.Info, - newSetting ? - nls.localize('enablePreview', "Preview editors have been enabled in settings.") : - nls.localize('disablePreview', "Preview editors have been disabled in settings."), - [{ - label: nls.localize('learnMore', "Learn More"), run: () => openerService.open('https://go.microsoft.com/fwlink/?linkid=2147473') - }] - ); } }); diff --git a/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.ts b/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.ts index 2d069c9a9e4b49d91dcae8b44e0adcaa49c4bd29..0f7a8480b326b260c18da7fdd799eb0d8cb06b24 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.ts @@ -48,7 +48,7 @@ class DiffEditorHelperContribution extends Disposable implements IDiffEditorCont Severity.Warning, nls.localize('hintTimeout', "The diff algorithm was stopped early (after {0} ms.)", this._diffEditor.maxComputationTime), [{ - label: nls.localize('removeTimeout', "Remove limit"), + label: nls.localize('removeTimeout', "Remove Limit"), run: () => { this._configurationService.updateValue('diffEditor.maxComputationTime', 0); } diff --git a/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.ts b/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.ts index f7a7ea98dfbfcbf24e4be5dae52af29ce3f0eb3c..0d817416672cc139e4531bcdb194fdd1be18dbe8 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.ts @@ -46,7 +46,7 @@ export class LargeFileOptimizationsWarner extends Disposable implements IEditorC this._notificationService.prompt(Severity.Info, message, [ { - label: nls.localize('removeOptimizations', "Forcefully enable features"), + label: nls.localize('removeOptimizations', "Forcefully Enable Features"), run: () => { this._configurationService.updateValue(`editor.largeFileOptimizations`, false).then(() => { this._notificationService.info(nls.localize('reopenFilePrompt', "Please reopen file in order for this setting to take effect.")); diff --git a/src/vs/workbench/contrib/localizations/browser/localizations.contribution.ts b/src/vs/workbench/contrib/localizations/browser/localizations.contribution.ts index f8b4c1582eb9fe160cae868f7e51e992d753aff3..a2dd3271590c989a3d9e4adec027132245463e84 100644 --- a/src/vs/workbench/contrib/localizations/browser/localizations.contribution.ts +++ b/src/vs/workbench/contrib/localizations/browser/localizations.contribution.ts @@ -60,7 +60,7 @@ export class LocalizationWorkbenchContribution extends Disposable implements IWo updateAndRestart ? localize('updateLocale', "Would you like to change VS Code's UI language to {0} and restart?", e.local.manifest.contributes.localizations[0].languageName || e.local.manifest.contributes.localizations[0].languageId) : localize('activateLanguagePack', "In order to use VS Code in {0}, VS Code needs to restart.", e.local.manifest.contributes.localizations[0].languageName || e.local.manifest.contributes.localizations[0].languageId), [{ - label: updateAndRestart ? localize('yes', "Yes") : localize('restart now', "Restart Now"), + label: updateAndRestart ? localize('changeAndRestart', "Change Language and Restart") : localize('restart', "Restart"), run: () => { const updatePromise = updateAndRestart ? this.jsonEditingService.write(this.environmentService.argvResource, [{ path: ['locale'], value: locale }], true) : Promise.resolve(undefined); updatePromise.then(() => this.hostService.restart(), e => this.notificationService.error(e));