Skip to content

Commit c0c7574

Browse files
committed
Split openReferencedFile command
1 parent 4fda4f7 commit c0c7574

2 files changed

Lines changed: 31 additions & 2 deletions

File tree

extensions/ql-vscode/package.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,14 @@
346346
"command": "codeQL.openReferencedFile",
347347
"title": "CodeQL: Open Referenced File"
348348
},
349+
{
350+
"command": "codeQL.openReferencedFileContextEditor",
351+
"title": "CodeQL: Open Referenced File"
352+
},
353+
{
354+
"command": "codeQL.openReferencedFileContextExplorer",
355+
"title": "CodeQL: Open Referenced File"
356+
},
349357
{
350358
"command": "codeQL.previewQueryHelp",
351359
"title": "CodeQL: Preview Query Help"
@@ -969,7 +977,7 @@
969977
"when": "resourceScheme != codeql-zip-archive"
970978
},
971979
{
972-
"command": "codeQL.openReferencedFile",
980+
"command": "codeQL.openReferencedFileContextExplorer",
973981
"group": "9_qlCommands",
974982
"when": "resourceExtname == .qlref"
975983
},
@@ -1024,6 +1032,14 @@
10241032
"command": "codeQL.openReferencedFile",
10251033
"when": "resourceExtname == .qlref"
10261034
},
1035+
{
1036+
"command": "codeQL.openReferencedFileContextEditor",
1037+
"when": "false"
1038+
},
1039+
{
1040+
"command": "codeQL.openReferencedFileContextExplorer",
1041+
"when": "false"
1042+
},
10271043
{
10281044
"command": "codeQL.previewQueryHelp",
10291045
"when": "resourceExtname == .qhelp && isWorkspaceTrusted"
@@ -1295,7 +1311,7 @@
12951311
"when": "editorLangId == ql"
12961312
},
12971313
{
1298-
"command": "codeQL.openReferencedFile",
1314+
"command": "codeQL.openReferencedFileContextEditor",
12991315
"when": "resourceExtname == .qlref"
13001316
},
13011317
{

extensions/ql-vscode/src/extension.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,6 +1330,19 @@ async function activateWithInstalledDistribution(
13301330
commandRunner("codeQL.openReferencedFile", openReferencedFile),
13311331
);
13321332

1333+
// Since we are tracking extension usage through commands, this command mirrors the "codeQL.openReferencedFile" command
1334+
ctx.subscriptions.push(
1335+
commandRunner("codeQL.openReferencedFileContextEditor", openReferencedFile),
1336+
);
1337+
1338+
// Since we are tracking extension usage through commands, this command mirrors the "codeQL.openReferencedFile" command
1339+
ctx.subscriptions.push(
1340+
commandRunner(
1341+
"codeQL.openReferencedFileContextExplorer",
1342+
openReferencedFile,
1343+
),
1344+
);
1345+
13331346
ctx.subscriptions.push(
13341347
commandRunner("codeQL.previewQueryHelp", previewQueryHelp),
13351348
);

0 commit comments

Comments
 (0)