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 @@ -185,14 +185,19 @@ export type EvalLogViewerCommands = {
185185 "codeQLEvalLogViewer.clear" : ( ) => Promise < void > ;
186186} ;
187187
188+ export type SummaryLanguageSupportCommands = {
189+ "codeQL.gotoQL" : ( ) => Promise < void > ;
190+ } ;
191+
188192export type AllCommands = BaseCommands &
189193 QueryHistoryCommands &
190194 LocalDatabasesCommands &
191195 VariantAnalysisCommands &
192196 DatabasePanelCommands &
193197 AstCfgCommands &
194198 PackagingCommands &
195- EvalLogViewerCommands ;
199+ EvalLogViewerCommands &
200+ SummaryLanguageSupportCommands ;
196201
197202export type AppCommandManager = CommandManager < AllCommands > ;
198203
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 = {
@@ -841,6 +844,7 @@ async function activateWithInstalledDistribution(
841844 cliServer,
842845 } ) ,
843846 ...evalLogViewer . getCommands ( ) ,
847+ ...summaryLanguageSupport . getCommands ( ) ,
844848 } ;
845849
846850 for ( const [ commandName , command ] of Object . entries ( allCommands ) ) {
@@ -937,8 +941,6 @@ async function activateWithInstalledDistribution(
937941 } ) ,
938942 ) ;
939943
940- ctx . subscriptions . push ( new SummaryLanguageSupport ( ) ) ;
941-
942944 void extLogger . log ( "Starting language server." ) ;
943945 await client . start ( ) ;
944946 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