@@ -1074,6 +1074,7 @@ async function activateWithInstalledDistribution(
10741074 queryServerLogger ,
10751075 ) ,
10761076 ) ;
1077+
10771078 ctx . subscriptions . push (
10781079 commandRunnerWithProgress (
10791080 "codeQL.quickEval" ,
@@ -1091,6 +1092,24 @@ async function activateWithInstalledDistribution(
10911092 ) ,
10921093 ) ;
10931094
1095+ // Since we are tracking extension usage through commands, this command mirrors the "codeQL.quickEval" command
1096+ ctx . subscriptions . push (
1097+ commandRunnerWithProgress (
1098+ "codeQL.quickEvalContextEditor" ,
1099+ async (
1100+ progress : ProgressCallback ,
1101+ token : CancellationToken ,
1102+ uri : Uri | undefined ,
1103+ ) => await compileAndRunQuery ( true , uri , progress , token , undefined ) ,
1104+ {
1105+ title : "Running query" ,
1106+ cancellable : true ,
1107+ } ,
1108+ // Open the query server logger on error since that's usually where the interesting errors appear.
1109+ queryServerLogger ,
1110+ ) ,
1111+ ) ;
1112+
10941113 ctx . subscriptions . push (
10951114 commandRunnerWithProgress (
10961115 "codeQL.codeLensQuickEval" ,
@@ -1311,6 +1330,19 @@ async function activateWithInstalledDistribution(
13111330 commandRunner ( "codeQL.openReferencedFile" , openReferencedFile ) ,
13121331 ) ;
13131332
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+
13141346 ctx . subscriptions . push (
13151347 commandRunner ( "codeQL.previewQueryHelp" , previewQueryHelp ) ,
13161348 ) ;
@@ -1576,6 +1608,44 @@ async function activateWithInstalledDistribution(
15761608 ) ,
15771609 ) ;
15781610
1611+ // Since we are tracking extension usage through commands, this command mirrors the "codeQL.viewCfg" command
1612+ ctx . subscriptions . push (
1613+ commandRunnerWithProgress (
1614+ "codeQL.viewCfgContextExplorer" ,
1615+ async ( progress : ProgressCallback , token : CancellationToken ) => {
1616+ const res = await cfgTemplateProvider . provideCfgUri (
1617+ window . activeTextEditor ?. document ,
1618+ ) ;
1619+ if ( res ) {
1620+ await compileAndRunQuery ( false , res [ 0 ] , progress , token , undefined ) ;
1621+ }
1622+ } ,
1623+ {
1624+ title : "Calculating Control Flow Graph" ,
1625+ cancellable : true ,
1626+ } ,
1627+ ) ,
1628+ ) ;
1629+
1630+ // Since we are tracking extension usage through commands, this command mirrors the "codeQL.viewCfg" command
1631+ ctx . subscriptions . push (
1632+ commandRunnerWithProgress (
1633+ "codeQL.viewCfgContextEditor" ,
1634+ async ( progress : ProgressCallback , token : CancellationToken ) => {
1635+ const res = await cfgTemplateProvider . provideCfgUri (
1636+ window . activeTextEditor ?. document ,
1637+ ) ;
1638+ if ( res ) {
1639+ await compileAndRunQuery ( false , res [ 0 ] , progress , token , undefined ) ;
1640+ }
1641+ } ,
1642+ {
1643+ title : "Calculating Control Flow Graph" ,
1644+ cancellable : true ,
1645+ } ,
1646+ ) ,
1647+ ) ;
1648+
15791649 const mockServer = new VSCodeMockGitHubApiServer ( ctx ) ;
15801650 ctx . subscriptions . push ( mockServer ) ;
15811651 ctx . subscriptions . push (
0 commit comments