File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed
Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,10 @@ export type EvalLogViewerCommands = {
191191 "codeQLEvalLogViewer.clear" : ( ) => Promise < void > ;
192192} ;
193193
194+ export type SummaryLanguageSupportCommands = {
195+ "codeQL.gotoQL" : ( ) => Promise < void > ;
196+ } ;
197+
194198export type AllCommands = BaseCommands &
195199 QueryHistoryCommands &
196200 LocalDatabasesCommands &
@@ -199,7 +203,8 @@ export type AllCommands = BaseCommands &
199203 AstCfgCommands &
200204 AstViewerCommands &
201205 PackagingCommands &
202- EvalLogViewerCommands ;
206+ EvalLogViewerCommands &
207+ SummaryLanguageSupportCommands ;
203208
204209export type AppCommandManager = CommandManager < AllCommands > ;
205210
Original file line number Diff line number Diff line change @@ -819,6 +819,9 @@ async function activateWithInstalledDistribution(
819819
820820 ctx . subscriptions . push ( astViewer ) ;
821821
822+ const summaryLanguageSupport = new SummaryLanguageSupport ( ) ;
823+ ctx . subscriptions . push ( summaryLanguageSupport ) ;
824+
822825 void extLogger . log ( "Registering top-level command palette commands." ) ;
823826
824827 const allCommands : AllCommands = {
@@ -842,6 +845,7 @@ async function activateWithInstalledDistribution(
842845 cliServer,
843846 } ) ,
844847 ...evalLogViewer . getCommands ( ) ,
848+ ...summaryLanguageSupport . getCommands ( ) ,
845849 } ;
846850
847851 for ( const [ commandName , command ] of Object . entries ( allCommands ) ) {
@@ -938,8 +942,6 @@ async function activateWithInstalledDistribution(
938942 } ) ,
939943 ) ;
940944
941- ctx . subscriptions . push ( new SummaryLanguageSupport ( ) ) ;
942-
943945 void extLogger . log ( "Starting language server." ) ;
944946 await client . start ( ) ;
945947 ctx . subscriptions . push ( {
Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ import {
1313 workspace ,
1414} from "vscode" ;
1515import { DisposableObject } from "../pure/disposable-object" ;
16- import { commandRunner } from "../commandRunner" ;
1716import { extLogger } from "../common" ;
1817import { getErrorMessage } from "../pure/helpers-pure" ;
18+ import { SummaryLanguageSupportCommands } from "../common/commands" ;
1919
2020/** A `Position` within a specified file on disk. */
2121interface PositionInFile {
@@ -73,8 +73,12 @@ export class SummaryLanguageSupport extends DisposableObject {
7373 this . handleDidCloseTextDocument . bind ( this ) ,
7474 ) ,
7575 ) ;
76+ }
7677
77- this . push ( commandRunner ( "codeQL.gotoQL" , this . handleGotoQL . bind ( this ) ) ) ;
78+ public getCommands ( ) : SummaryLanguageSupportCommands {
79+ return {
80+ "codeQL.gotoQL" : this . handleGotoQL . bind ( this ) ,
81+ } ;
7882 }
7983
8084 /**
You can’t perform that action at this time.
0 commit comments