diff --git a/src/sql/workbench/contrib/notebook/test/browser/dataResourceDataProvider.test.ts b/src/sql/workbench/contrib/notebook/test/browser/dataResourceDataProvider.test.ts index 6625ddf8ba3e..53695ce3941f 100644 --- a/src/sql/workbench/contrib/notebook/test/browser/dataResourceDataProvider.test.ts +++ b/src/sql/workbench/contrib/notebook/test/browser/dataResourceDataProvider.test.ts @@ -77,7 +77,8 @@ suite('Data Resource Data Provider', function () { contextService, fileDialogService, notificationService, - undefined // IOpenerService + undefined, // IOpenerService + undefined // ICommandService ); instantiationService = TypeMoq.Mock.ofType(InstantiationService, TypeMoq.MockBehavior.Strict); instantiationService.setup(x => x.createInstance(TypeMoq.It.isValue(ResultSerializer))) diff --git a/src/sql/workbench/services/query/common/resultSerializer.ts b/src/sql/workbench/services/query/common/resultSerializer.ts index 2a30b3adb17e..a256d672a01d 100644 --- a/src/sql/workbench/services/query/common/resultSerializer.ts +++ b/src/sql/workbench/services/query/common/resultSerializer.ts @@ -20,6 +20,7 @@ import { IFileDialogService, FileFilter } from 'vs/platform/dialogs/common/dialo import { IOpenerService } from 'vs/platform/opener/common/opener'; import { IQueryEditorConfiguration } from 'sql/platform/query/common/query'; import { Schemas } from 'vs/base/common/network'; +import { ICommandService } from 'vs/platform/commands/common/commands'; let prevSavePath: URI; @@ -58,7 +59,8 @@ export class ResultSerializer { @IWorkspaceContextService private _contextService: IWorkspaceContextService, @IFileDialogService private readonly fileDialogService: IFileDialogService, @INotificationService private _notificationService: INotificationService, - @IOpenerService private readonly openerService: IOpenerService + @IOpenerService private readonly openerService: IOpenerService, + @ICommandService private readonly commandService: ICommandService ) { } /** @@ -372,6 +374,12 @@ export class ResultSerializer { run: () => { this.openerService.open(filePath, { openExternal: format === SaveFormat.EXCEL }); } + }, + { + label: nls.localize('openFileLocation', "Open file location"), + run: async () => { + this.commandService.executeCommand('revealFileInOS', filePath); + } }] ); }