fix export for remote (#10934)

This commit is contained in:
Anthony Dresser
2020-06-16 12:10:05 -07:00
committed by GitHub
parent ad5c697f87
commit 381a747b62
3 changed files with 17 additions and 86 deletions

View File

@@ -1,32 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Action } from 'vs/base/common/actions';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { URI } from 'vs/base/common/uri';
// eslint-disable-next-line code-layering,code-import-patterns
import { IElectronService } from 'vs/platform/electron/electron-sandbox/electron';
export class ShowFileInFolderAction extends Action {
constructor(private path: string, label: string, @IElectronService private electronService: IElectronService) {
super('showItemInFolder.action.id', label);
}
run(): Promise<void> {
return this.electronService.showItemInFolder(this.path);
}
}
export class OpenFileInFolderAction extends Action {
constructor(private path: string, label: string, @IOpenerService private openerService: IOpenerService) {
super('openItemInFolder.action.id', label);
}
run() {
return this.openerService.open(URI.file(this.path), { openExternal: true });
}
}