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 @@ -108,10 +108,15 @@ export type DatabasePanelCommands = {
108108 "codeQLVariantAnalysisRepositories.removeItemContextMenu" : SingleSelectionCommandFunction < DbTreeViewItem > ;
109109} ;
110110
111+ export type EvalLogViewerCommands = {
112+ "codeQLEvalLogViewer.clear" : ( ) => Promise < void > ;
113+ } ;
114+
111115export type AllCommands = BaseCommands &
112116 QueryHistoryCommands &
113117 LocalDatabasesCommands &
114118 VariantAnalysisCommands &
115- DatabasePanelCommands ;
119+ DatabasePanelCommands &
120+ EvalLogViewerCommands ;
116121
117122export type AppCommandManager = CommandManager < AllCommands > ;
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 @@ -1102,6 +1102,7 @@ async function activateWithInstalledDistribution(
11021102 ...variantAnalysisManager . getCommands ( ) ,
11031103 ...databaseUI . getCommands ( ) ,
11041104 ...dbModule . getCommands ( ) ,
1105+ ...evalLogViewer . getCommands ( ) ,
11051106 } ;
11061107
11071108 for ( const [ commandName , command ] of Object . entries ( allCommands ) ) {
You can’t perform that action at this time.
0 commit comments