提交 c234142c 编写于 作者: B Benjamin Pasero

polish for #15961

上级 b5c2c08f
...@@ -26,7 +26,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi ...@@ -26,7 +26,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi
import { Query } from 'vs/workbench/parts/extensions/common/extensionQuery'; import { Query } from 'vs/workbench/parts/extensions/common/extensionQuery';
import { IFileService } from 'vs/platform/files/common/files'; import { IFileService } from 'vs/platform/files/common/files';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { ICommandService } from 'vs/platform/commands/common/commands'; import { IWindowService } from 'vs/platform/windows/common/windows';
import { IExtensionService, IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { IExtensionService, IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import URI from 'vs/base/common/uri'; import URI from 'vs/base/common/uri';
...@@ -742,9 +742,8 @@ export class ReloadAction extends Action { ...@@ -742,9 +742,8 @@ export class ReloadAction extends Action {
constructor( constructor(
@IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService,
@IMessageService private messageService: IMessageService, @IMessageService private messageService: IMessageService,
@IInstantiationService private instantiationService: IInstantiationService, @IWindowService private windowService: IWindowService,
@IExtensionService private extensionService: IExtensionService, @IExtensionService private extensionService: IExtensionService
@ICommandService private commandService: ICommandService
) { ) {
super('extensions.reload', localize('reloadAction', "Reload"), ReloadAction.DisabledClass, false); super('extensions.reload', localize('reloadAction', "Reload"), ReloadAction.DisabledClass, false);
this.throttler = new Throttler(); this.throttler = new Throttler();
...@@ -818,9 +817,8 @@ export class ReloadAction extends Action { ...@@ -818,9 +817,8 @@ export class ReloadAction extends Action {
} }
run(): TPromise<any> { run(): TPromise<any> {
if (this.messageService.confirm({ message: this.reloadMessaage })) { if (this.messageService.confirm({ message: this.reloadMessaage, primaryButton: localize('reload', "&&Reload Window") })) {
// TODO: @sandy: Temporary hack. Adopt to new IWindowService from @bpasero and @jaoa return this.windowService.reloadWindow();
this.commandService.executeCommand('workbench.action.reloadWindow');
} }
return TPromise.wrap(null); return TPromise.wrap(null);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册