Fix dipose "method not implemented" errors in MainThread API classes (#15257)

This commit is contained in:
Charles Gagnon
2021-04-28 09:39:04 -07:00
committed by GitHub
parent 2cf15b51f9
commit 57cd25fab9
4 changed files with 14 additions and 22 deletions

View File

@@ -20,9 +20,10 @@ import { assign } from 'vs/base/common/objects';
import { TelemetryView, TelemetryAction } from 'sql/platform/telemetry/common/telemetryKeys';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
import { IEditorInput, IEditorPane } from 'vs/workbench/common/editor';
import { Disposable } from 'vs/base/common/lifecycle';
@extHostNamedCustomer(SqlMainContext.MainThreadModelViewDialog)
export class MainThreadModelViewDialog implements MainThreadModelViewDialogShape {
export class MainThreadModelViewDialog extends Disposable implements MainThreadModelViewDialogShape {
private readonly _proxy: ExtHostModelViewDialogShape;
private readonly _dialogs = new Map<number, Dialog>();
private readonly _tabs = new Map<number, DialogTab>();
@@ -40,14 +41,11 @@ export class MainThreadModelViewDialog implements MainThreadModelViewDialogShape
@IEditorService private _editorService: IEditorService,
@IAdsTelemetryService private _telemetryService: IAdsTelemetryService
) {
super();
this._proxy = context.getProxy(SqlExtHostContext.ExtHostModelViewDialog);
this._dialogService = new CustomDialogService(_instatiationService);
}
public dispose(): void {
throw new Error('Method not implemented.');
}
public $openEditor(handle: number, modelViewId: string, title: string, name?: string, options?: azdata.ModelViewEditorOptions, position?: vscode.ViewColumn): Thenable<void> {
return new Promise<void>((resolve, reject) => {
let saveHandler: ModeViewSaveHandler = options && options.supportsSave ? (h) => this.handleSave(h) : undefined;