Make MethodModelingViewProvider a disposable object (#2862)
This commit is contained in:
@@ -11,6 +11,7 @@ export class MethodModelingPanel extends DisposableObject {
|
||||
super();
|
||||
|
||||
this.provider = new MethodModelingViewProvider(app);
|
||||
this.push(this.provider);
|
||||
this.push(
|
||||
window.registerWebviewViewProvider(
|
||||
MethodModelingViewProvider.viewType,
|
||||
|
||||
@@ -8,13 +8,19 @@ import { extLogger } from "../../common/logging/vscode/loggers";
|
||||
import { App } from "../../common/app";
|
||||
import { redactableError } from "../../common/errors";
|
||||
import { Method } from "../method";
|
||||
import { DisposableObject } from "../../common/disposable-object";
|
||||
|
||||
export class MethodModelingViewProvider implements WebviewViewProvider {
|
||||
export class MethodModelingViewProvider
|
||||
extends DisposableObject
|
||||
implements WebviewViewProvider
|
||||
{
|
||||
public static readonly viewType = "codeQLMethodModeling";
|
||||
|
||||
private webviewView: vscode.WebviewView | undefined = undefined;
|
||||
|
||||
constructor(private readonly app: App) {}
|
||||
constructor(private readonly app: App) {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* This is called when a view first becomes visible. This may happen when the view is
|
||||
|
||||
Reference in New Issue
Block a user