Files
azuredatastudio/src/sql/workbench/common/workspaceActions.ts
Anthony Dresser 0f934081e1 More layering and strictness (#9004)
* move handling generated files to the serilization classes

* remove unneeded methods

* add more folders to strictire compile, add more strict compile options

* update ci

* wip

* add more layering and fix issues

* add more strictness

* remove unnecessary assertion

* add missing checks

* fix indentation

* wip

* remove jsdoc

* fix layering

* fix compile

* fix compile errors

* wip

* wip

* finish layering

* fix css

* more layering

* remove no longer good parts

* fix issues with startup

* another try

* fix startup
2020-02-11 00:47:17 -06:00

33 lines
1.2 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* 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';
// eslint-disable-next-line code-layering,code-import-patterns
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, @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 });
}
}