Merge from vscode 817eb6b0c720a4ecbc13c020afbbebfed667aa09 (#7356)

This commit is contained in:
Anthony Dresser
2019-09-24 21:36:17 -07:00
committed by GitHub
parent a29ae4d3b9
commit 6a6048d40f
541 changed files with 7045 additions and 7287 deletions

View File

@@ -20,6 +20,7 @@ import { IInsightOptions } from 'sql/workbench/parts/charts/common/interfaces';
import { IFileService } from 'vs/platform/files/common/files';
import { IFileDialogService } from 'vs/platform/dialogs/common/dialogs';
import { VSBuffer } from 'vs/base/common/buffer';
import { IOpenerService } from 'vs/platform/opener/common/opener';
export interface IChartActionContext {
options: IInsightOptions;
@@ -142,10 +143,10 @@ export class SaveImageAction extends Action {
public static ICON = 'saveAsImage';
constructor(
@IWindowsService private readonly windowsService: IWindowsService,
@INotificationService private readonly notificationService: INotificationService,
@IFileService private readonly fileService: IFileService,
@IFileDialogService private readonly fileDialogService: IFileDialogService
@IFileDialogService private readonly fileDialogService: IFileDialogService,
@IOpenerService private readonly openerService: IOpenerService
) {
super(SaveImageAction.ID, SaveImageAction.LABEL, SaveImageAction.ICON);
}
@@ -168,7 +169,7 @@ export class SaveImageAction extends Action {
if (err) {
this.notificationService.error(err.message);
} else {
this.windowsService.openExternal(filePath.toString());
this.openerService.open(filePath, { openExternal: true });
this.notificationService.notify({
severity: Severity.Error,
message: localize('chartSaved', "Saved Chart to path: {0}", filePath.toString())

View File

@@ -35,6 +35,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import { ObjectExplorerActionsContext } from 'sql/workbench/parts/objectExplorer/browser/objectExplorerActions';
import { ItemContextKey } from 'sql/workbench/parts/dashboard/browser/widgets/explorer/explorerTreeContext';
import { ManageActionContext } from 'sql/workbench/browser/actions';
import { IHostService } from 'vs/workbench/services/host/browser/host';
import { MarkdownOutputComponent } from 'sql/workbench/parts/notebook/browser/outputs/markdownOutput.component';
import { registerCellComponent } from 'sql/platform/notebooks/common/outputRegistry';
import { TextCellComponent } from 'sql/workbench/parts/notebook/browser/cellViews/textCell.component';
@@ -130,6 +131,7 @@ registerAction({
const viewletService = accessor.get(IViewletService);
const workspaceEditingService = accessor.get(IWorkspaceEditingService);
const windowService = accessor.get(IWindowService);
const hostService = accessor.get(IHostService);
let folders = [];
if (!options.folderPath) {
return;
@@ -141,7 +143,7 @@ registerAction({
return windowService.openWindow([{ folderUri: folders[0] }], { forceNewWindow: options.forceNewWindow });
}
else {
return windowService.reloadWindow();
return hostService.reload();
}
}
});