mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 17:23:02 -05:00
Merge from vscode 817eb6b0c720a4ecbc13c020afbbebfed667aa09 (#7356)
This commit is contained in:
@@ -4,28 +4,31 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
//tslint:disable-next-line:layering
|
||||
import { ElectronMainService } from 'vs/platform/electron/electron-main/electronMainService';
|
||||
//tslint:disable-next-line:layering
|
||||
import { IElectronService } from 'vs/platform/electron/node/electron';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
|
||||
export class ShowFileInFolderAction extends Action {
|
||||
|
||||
constructor(private path: string, label: string, private windowsService: ElectronMainService) {
|
||||
constructor(private path: string, label: string, @IElectronService private windowsService: ElectronMainService) {
|
||||
super('showItemInFolder.action.id', label);
|
||||
}
|
||||
|
||||
run(): Promise<void> {
|
||||
return this.windowsService.showItemInFolder(this.path);
|
||||
return this.windowsService.showItemInFolder(undefined, this.path);
|
||||
}
|
||||
}
|
||||
|
||||
export class OpenFileInFolderAction extends Action {
|
||||
|
||||
constructor(private path: string, label: string, private windowsService: IWindowsService) {
|
||||
constructor(private path: string, label: string, @IOpenerService private openerService: IOpenerService) {
|
||||
super('showItemInFolder.action.id', label);
|
||||
}
|
||||
|
||||
run() {
|
||||
return this.windowsService.openExternal(this.path);
|
||||
return this.openerService.open(URI.file(this.path));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user