Skip to content

Commit c650afb

Browse files
committed
Fix CFG viewer
After some bit of refactoring, the templates are no longer being passed to the CFG viewer and this is preventing the viewer from running. This change fixes it.
1 parent c319d61 commit c650afb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

extensions/ql-vscode/src/language-support/ast-viewer/ast-cfg-commands.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ export function getAstCfgCommands({
5252
progress,
5353
token,
5454
undefined,
55+
undefined,
56+
res[1],
5557
);
5658
}
5759
},

extensions/ql-vscode/src/local-queries/local-queries.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ export class LocalQueries extends DisposableObject {
337337
token: CancellationToken,
338338
databaseItem: DatabaseItem | undefined,
339339
range?: Range,
340+
templates?: Record<string, string>,
340341
): Promise<void> {
341342
await this.compileAndRunQueryInternal(
342343
quickEval,
@@ -345,6 +346,7 @@ export class LocalQueries extends DisposableObject {
345346
token,
346347
databaseItem,
347348
range,
349+
templates,
348350
);
349351
}
350352

@@ -356,6 +358,7 @@ export class LocalQueries extends DisposableObject {
356358
token: CancellationToken,
357359
databaseItem: DatabaseItem | undefined,
358360
range?: Range,
361+
templates?: Record<string, string>,
359362
): Promise<CoreCompletedQuery> {
360363
let queryPath: string;
361364
if (queryUri !== undefined) {
@@ -395,7 +398,7 @@ export class LocalQueries extends DisposableObject {
395398
extensionPacks,
396399
this.queryStorageDir,
397400
undefined,
398-
undefined,
401+
templates,
399402
);
400403

401404
// handle cancellation from the history view.

0 commit comments

Comments
 (0)