mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
Added feature for opening file after exporting to CSV/XLS/JSON & query files (#2216)
* Fix #746. Added prompt for opening saved file location/file after save. This fix includes saving of JSON/CSV/Excel & saving of a new SQL file. * Changed var to let. Moved code from vs dir to sql. Removed support for showing file location after file save. (Will be moved to another PR). #746
This commit is contained in:
25
src/sql/workbench/common/workspaceActions.ts
Normal file
25
src/sql/workbench/common/workspaceActions.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
|
||||
export class ShowFileInFolderAction extends Action {
|
||||
|
||||
constructor(private path: string, label: string, private windowsService: IWindowsService) {
|
||||
super('showItemInFolder.action.id', label);
|
||||
}
|
||||
|
||||
run(): TPromise<void> {
|
||||
return this.windowsService.showItemInFolder(this.path);
|
||||
}
|
||||
}
|
||||
|
||||
export class OpenFileInFolderAction extends Action {
|
||||
|
||||
constructor(private path: string, label: string, private windowsService: IWindowsService) {
|
||||
super('showItemInFolder.action.id', label);
|
||||
}
|
||||
|
||||
run() {
|
||||
return this.windowsService.openExternal(this.path);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user