File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed
Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -138,11 +138,16 @@ export type DatabasePanelCommands = {
138138 "codeQLVariantAnalysisRepositories.removeItemContextMenu" : SingleSelectionCommandFunction < DbTreeViewItem > ;
139139} ;
140140
141+ export type EvalLogViewerCommands = {
142+ "codeQLEvalLogViewer.clear" : ( ) => Promise < void > ;
143+ } ;
144+
141145export type AllCommands = BaseCommands &
142146 QueryHistoryCommands &
143147 LocalDatabasesCommands &
144148 VariantAnalysisCommands &
145- DatabasePanelCommands ;
149+ DatabasePanelCommands &
150+ EvalLogViewerCommands ;
146151
147152export type AppCommandManager = CommandManager < AllCommands > ;
148153
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ import {
88 EventEmitter ,
99 TreeItemCollapsibleState ,
1010} from "vscode" ;
11- import { commandRunner } from "./commandRunner" ;
1211import { DisposableObject } from "./pure/disposable-object" ;
1312import { showAndLogExceptionWithTelemetry } from "./helpers" ;
1413import { asError , getErrorMessage } from "./pure/helpers-pure" ;
1514import { redactableError } from "./pure/errors" ;
15+ import { EvalLogViewerCommands } from "./common/commands" ;
1616
1717export interface EvalLogTreeItem {
1818 label ?: string ;
@@ -80,11 +80,12 @@ export class EvalLogViewer extends DisposableObject {
8080
8181 this . push ( this . treeView ) ;
8282 this . push ( this . treeDataProvider ) ;
83- this . push (
84- commandRunner ( "codeQLEvalLogViewer.clear" , async ( ) => {
85- this . clear ( ) ;
86- } ) ,
87- ) ;
83+ }
84+
85+ public getCommands ( ) : EvalLogViewerCommands {
86+ return {
87+ "codeQLEvalLogViewer.clear" : async ( ) => this . clear ( ) ,
88+ } ;
8889 }
8990
9091 private clear ( ) : void {
Original file line number Diff line number Diff line change @@ -804,6 +804,7 @@ async function activateWithInstalledDistribution(
804804 ...variantAnalysisManager . getCommands ( ) ,
805805 ...databaseUI . getCommands ( ) ,
806806 ...dbModule . getCommands ( ) ,
807+ ...evalLogViewer . getCommands ( ) ,
807808 } ;
808809
809810 for ( const [ commandName , command ] of Object . entries ( allCommands ) ) {
You can’t perform that action at this time.
0 commit comments