Change forceExtensionHostSearch strategy for easier testing

This commit is contained in:
Rob Lourens
2021-08-18 19:10:49 -07:00
parent 3673539e09
commit 188c29a419
7 changed files with 21 additions and 21 deletions

View File

@@ -8,7 +8,6 @@ import { Schemas } from 'vs/base/common/network';
import { URI } from 'vs/base/common/uri';
import * as pfs from 'vs/base/node/pfs';
import { ILogService } from 'vs/platform/log/common/log';
import { IExtHostInitDataService } from 'vs/workbench/api/common/extHostInitDataService';
import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';
import { ExtHostSearch, reviveQuery } from 'vs/workbench/api/common/extHostSearch';
import { IURITransformerService } from 'vs/workbench/api/common/extHostUriTransformerService';
@@ -29,7 +28,6 @@ export class NativeExtHostSearch extends ExtHostSearch {
constructor(
@IExtHostRpcService extHostRpc: IExtHostRpcService,
@IExtHostInitDataService initData: IExtHostInitDataService,
@IURITransformerService _uriTransformer: IURITransformerService,
@ILogService _logService: ILogService,
) {
@@ -37,11 +35,9 @@ export class NativeExtHostSearch extends ExtHostSearch {
const outputChannel = new OutputChannel('RipgrepSearchUD', this._logService);
this.registerTextSearchProvider(Schemas.userData, new RipgrepSearchProvider(outputChannel));
this._registerEHSearchProviders();
}
private _registerEHSearchProviders(): void {
override $enableExtensionHostSearch(): void {
const outputChannel = new OutputChannel('RipgrepSearchEH', this._logService);
this.registerTextSearchProvider(Schemas.file, new RipgrepSearchProvider(outputChannel));
this.registerInternalFileSearchProvider(Schemas.file, new SearchService());