mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
Add Open file location as an option after an excel file is saved (#24331)
* Add Open file location as an option after an excel file is saved * Fix test failure
This commit is contained in:
@@ -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)))
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user