|
1 | 1 | import { dirname, basename, normalize, relative } from "path"; |
2 | 2 | import { Discovery } from "../common/discovery"; |
3 | 3 | import { CodeQLCliServer } from "../codeql-cli/cli"; |
4 | | -import { |
5 | | - Event, |
6 | | - EventEmitter, |
7 | | - RelativePattern, |
8 | | - Uri, |
9 | | - WorkspaceFolder, |
10 | | -} from "vscode"; |
| 4 | +import { Event, RelativePattern, Uri, WorkspaceFolder } from "vscode"; |
11 | 5 | import { MultiFileSystemWatcher } from "../common/vscode/multi-file-system-watcher"; |
12 | 6 | import { App } from "../common/app"; |
13 | 7 | import { FileTreeDirectory, FileTreeLeaf } from "../common/file-tree-nodes"; |
@@ -36,16 +30,15 @@ interface QueryDiscoveryResults { |
36 | 30 | export class QueryDiscovery extends Discovery<QueryDiscoveryResults> { |
37 | 31 | private results: QueryDiscoveryResults | undefined; |
38 | 32 |
|
39 | | - private readonly onDidChangeQueriesEmitter = this.push( |
40 | | - new EventEmitter<void>(), |
41 | | - ); |
| 33 | + private readonly onDidChangeQueriesEmitter; |
42 | 34 | private readonly watcher: MultiFileSystemWatcher = this.push( |
43 | 35 | new MultiFileSystemWatcher(), |
44 | 36 | ); |
45 | 37 |
|
46 | 38 | constructor(app: App, private readonly cliServer: CodeQLCliServer) { |
47 | 39 | super("Query Discovery"); |
48 | 40 |
|
| 41 | + this.onDidChangeQueriesEmitter = this.push(app.createEventEmitter<void>()); |
49 | 42 | this.push(app.onDidChangeWorkspaceFolders(this.refresh.bind(this))); |
50 | 43 | this.push(this.watcher.onDidChange(this.refresh.bind(this))); |
51 | 44 | } |
|
0 commit comments