@@ -14,9 +14,8 @@ import {
1414import { showAndLogWarningMessage } from "./helpers" ;
1515import { TestTreeNode } from "./test-tree-node" ;
1616import { DisposableObject } from "./pure/disposable-object" ;
17- import { UIService } from "./vscode-utils/ui-service" ;
1817import { QLTestAdapter , getExpectedFile , getActualFile } from "./test-adapter" ;
19- import { extLogger } from "./common" ;
18+ import { TestUICommands } from "./common/commands " ;
2019
2120type VSCodeTestEvent =
2221 | TestRunStartedEvent
@@ -42,22 +41,23 @@ class QLTestListener extends DisposableObject {
4241/**
4342 * Service that implements all UI and commands for QL tests.
4443 */
45- export class TestUIService extends UIService implements TestController {
44+ export class TestUIService extends DisposableObject implements TestController {
4645 private readonly listeners : Map < TestAdapter , QLTestListener > = new Map ( ) ;
4746
4847 constructor ( private readonly testHub : TestHub ) {
4948 super ( ) ;
5049
51- void extLogger . log ( "Registering CodeQL test panel commands." ) ;
52- this . registerCommand (
53- "codeQLTests.showOutputDifferences" ,
54- this . showOutputDifferences ,
55- ) ;
56- this . registerCommand ( "codeQLTests.acceptOutput" , this . acceptOutput ) ;
57-
5850 testHub . registerTestController ( this ) ;
5951 }
6052
53+ public getCommands ( ) : TestUICommands {
54+ return {
55+ "codeQLTests.showOutputDifferences" :
56+ this . showOutputDifferences . bind ( this ) ,
57+ "codeQLTests.acceptOutput" : this . acceptOutput . bind ( this ) ,
58+ } ;
59+ }
60+
6161 public dispose ( ) : void {
6262 this . testHub . unregisterTestController ( this ) ;
6363
0 commit comments