Skip to content

Commit 9175449

Browse files
Merge pull request #2811 from github/robertbrignull/fix-jump-to-usage
Fix jumping to usage and updating method modeling panel
2 parents 93fc90f + c8487c9 commit 9175449

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

extensions/ql-vscode/src/common/commands.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type {
1212
} from "../variant-analysis/shared/variant-analysis";
1313
import type { QLDebugConfiguration } from "../debugger/debug-configuration";
1414
import type { QueryTreeViewItem } from "../queries-panel/query-tree-view-item";
15-
import type { Usage } from "../model-editor/method";
15+
import type { Method, Usage } from "../model-editor/method";
1616

1717
// A command function matching the signature that VS Code calls when
1818
// a command is invoked from a context menu on a TreeView with
@@ -306,6 +306,7 @@ export type PackagingCommands = {
306306
export type ModelEditorCommands = {
307307
"codeQL.openModelEditor": () => Promise<void>;
308308
"codeQLModelEditor.jumpToUsageLocation": (
309+
method: Method,
309310
usage: Usage,
310311
databaseItem: DatabaseItem,
311312
) => Promise<void>;

extensions/ql-vscode/src/model-editor/model-editor-module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,11 @@ export class ModelEditorModule extends DisposableObject {
177177
);
178178
},
179179
"codeQLModelEditor.jumpToUsageLocation": async (
180+
method: Method,
180181
usage: Usage,
181182
databaseItem: DatabaseItem,
182183
) => {
184+
await this.methodModelingPanel.setMethod(method);
183185
await showResolvableLocation(usage.url, databaseItem, this.app.logger);
184186
},
185187
};

0 commit comments

Comments
 (0)