mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 03:28:33 -05:00
Merge from vscode 1fbacccbc900bb59ba8a8f26a4128d48a1c97842
This commit is contained in:
@@ -21,6 +21,8 @@ import { VSBuffer } from 'vs/base/common/buffer';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { IUntitledTextEditorService } from 'vs/workbench/services/untitled/common/untitledTextEditorService';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput';
|
||||
|
||||
export interface IChartActionContext {
|
||||
options: IInsightOptions;
|
||||
@@ -35,7 +37,8 @@ export class CreateInsightAction extends Action {
|
||||
constructor(
|
||||
@IEditorService private editorService: IEditorService,
|
||||
@INotificationService private notificationService: INotificationService,
|
||||
@IUntitledTextEditorService private untitledEditorService: IUntitledTextEditorService
|
||||
@IUntitledTextEditorService private untitledEditorService: IUntitledTextEditorService,
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService
|
||||
) {
|
||||
super(CreateInsightAction.ID, CreateInsightAction.LABEL, CreateInsightAction.ICON);
|
||||
}
|
||||
@@ -74,7 +77,7 @@ export class CreateInsightAction extends Action {
|
||||
|
||||
let input = this.untitledEditorService.create({ mode: 'json', initialValue: JSON.stringify(widgetConfig) });
|
||||
|
||||
return this.editorService.openEditor(input, { pinned: true })
|
||||
return this.editorService.openEditor(this.instantiationService.createInstance(UntitledTextEditorInput, input), { pinned: true })
|
||||
.then(
|
||||
() => true,
|
||||
error => {
|
||||
|
||||
Reference in New Issue
Block a user