Merge pull request #2811 from github/robertbrignull/fix-jump-to-usage

Fix jumping to usage and updating method modeling panel
This commit is contained in:
Robert
2023-09-13 13:07:24 +01:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ import type {
} from "../variant-analysis/shared/variant-analysis";
import type { QLDebugConfiguration } from "../debugger/debug-configuration";
import type { QueryTreeViewItem } from "../queries-panel/query-tree-view-item";
import type { Usage } from "../model-editor/method";
import type { Method, Usage } from "../model-editor/method";
// A command function matching the signature that VS Code calls when
// a command is invoked from a context menu on a TreeView with
@@ -306,6 +306,7 @@ export type PackagingCommands = {
export type ModelEditorCommands = {
"codeQL.openModelEditor": () => Promise<void>;
"codeQLModelEditor.jumpToUsageLocation": (
method: Method,
usage: Usage,
databaseItem: DatabaseItem,
) => Promise<void>;

View File

@@ -177,9 +177,11 @@ export class ModelEditorModule extends DisposableObject {
);
},
"codeQLModelEditor.jumpToUsageLocation": async (
method: Method,
usage: Usage,
databaseItem: DatabaseItem,
) => {
await this.methodModelingPanel.setMethod(method);
await showResolvableLocation(usage.url, databaseItem, this.app.logger);
},
};