diff --git a/extensions/ql-vscode/src/test-ui.ts b/extensions/ql-vscode/src/test-ui.ts index 102053fec..5739d438f 100644 --- a/extensions/ql-vscode/src/test-ui.ts +++ b/extensions/ql-vscode/src/test-ui.ts @@ -14,7 +14,6 @@ import { import { showAndLogWarningMessage } from "./helpers"; import { TestTreeNode } from "./test-tree-node"; import { DisposableObject } from "./pure/disposable-object"; -import { UIService } from "./vscode-utils/ui-service"; import { QLTestAdapter, getExpectedFile, getActualFile } from "./test-adapter"; import { TestUICommands } from "./common/commands"; @@ -42,7 +41,7 @@ class QLTestListener extends DisposableObject { /** * Service that implements all UI and commands for QL tests. */ -export class TestUIService extends UIService implements TestController { +export class TestUIService extends DisposableObject implements TestController { private readonly listeners: Map = new Map(); constructor(private readonly testHub: TestHub) { diff --git a/extensions/ql-vscode/src/vscode-utils/ui-service.ts b/extensions/ql-vscode/src/vscode-utils/ui-service.ts deleted file mode 100644 index c2ffef0c8..000000000 --- a/extensions/ql-vscode/src/vscode-utils/ui-service.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { TreeDataProvider, window } from "vscode"; -import { DisposableObject } from "../pure/disposable-object"; -import { commandRunner } from "../commandRunner"; - -/** - * A VS Code service that interacts with the UI, including handling commands. - */ -export class UIService extends DisposableObject { - protected constructor() { - super(); - } - - /** - * Registers a command handler with Visual Studio Code. - * @param command The ID of the command to register. - * @param callback Callback function to implement the command. - * @remarks The command handler is automatically unregistered when the service is disposed. - */ - protected registerCommand( - command: string, - callback: (...args: any[]) => any, - ): void { - this.push(commandRunner(command, callback.bind(this))); - } - - protected registerTreeDataProvider( - viewId: string, - treeDataProvider: TreeDataProvider, - ): void { - this.push(window.registerTreeDataProvider(viewId, treeDataProvider)); - } -}