Use command manager executeCommand
This commit is contained in:
@@ -268,7 +268,14 @@ export class VariantAnalysisManager
|
||||
}
|
||||
if (!this.views.has(variantAnalysisId)) {
|
||||
// The view will register itself with the manager, so we don't need to do anything here.
|
||||
this.track(new VariantAnalysisView(this.ctx, variantAnalysisId, this));
|
||||
this.track(
|
||||
new VariantAnalysisView(
|
||||
this.ctx,
|
||||
this.app.commandManager,
|
||||
variantAnalysisId,
|
||||
this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
const variantAnalysisView = this.views.get(variantAnalysisId)!;
|
||||
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
} from "./variant-analysis-view-manager";
|
||||
import { showAndLogWarningMessage } from "../helpers";
|
||||
import { telemetryListener } from "../telemetry";
|
||||
import { ExtensionCommandManager } from "../common/commands";
|
||||
|
||||
export class VariantAnalysisView
|
||||
extends AbstractWebview<ToVariantAnalysisMessage, FromVariantAnalysisMessage>
|
||||
@@ -26,6 +27,7 @@ export class VariantAnalysisView
|
||||
|
||||
public constructor(
|
||||
ctx: ExtensionContext,
|
||||
private readonly commandManager: ExtensionCommandManager,
|
||||
public readonly variantAnalysisId: number,
|
||||
private readonly manager: VariantAnalysisViewManager<VariantAnalysisView>,
|
||||
) {
|
||||
@@ -145,7 +147,7 @@ export class VariantAnalysisView
|
||||
);
|
||||
break;
|
||||
case "openLogs":
|
||||
await commands.executeCommand(
|
||||
await this.commandManager.executeCommand(
|
||||
"codeQL.openVariantAnalysisLogs",
|
||||
this.variantAnalysisId,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user