@@ -9,7 +9,7 @@ import { URI, UriComponents } from 'vs/base/common/uri';
99import * as pfs from 'vs/base/node/pfs' ;
1010import { ILogService } from 'vs/platform/log/common/log' ;
1111import { IFileQuery , IFolderQuery , IRawFileQuery , IRawQuery , IRawTextQuery , ISearchCompleteStats , ITextQuery , isSerializedFileMatch , ISerializedSearchProgressItem } from 'vs/workbench/services/search/common/search' ;
12- import { FileSearchManager } from 'vs/workbench/services/search/node /fileSearchManager' ;
12+ import { FileSearchManager } from 'vs/workbench/services/search/common /fileSearchManager' ;
1313import { SearchService } from 'vs/workbench/services/search/node/rawSearchService' ;
1414import { RipgrepSearchProvider } from 'vs/workbench/services/search/node/ripgrepSearchProvider' ;
1515import { OutputChannel } from 'vs/workbench/services/search/node/ripgrepSearchUtils' ;
@@ -56,6 +56,17 @@ export class ExtHostSearch implements ExtHostSearchShape {
5656 this . registerInternalFileSearchProvider ( 'file' , new SearchService ( ) ) ;
5757 }
5858
59+ private registerInternalFileSearchProvider ( scheme : string , provider : SearchService ) : IDisposable {
60+ const handle = this . _handlePool ++ ;
61+ this . _internalFileSearchProvider = provider ;
62+ this . _internalFileSearchHandle = handle ;
63+ this . _proxy . $registerFileSearchProvider ( handle , this . _transformScheme ( scheme ) ) ;
64+ return toDisposable ( ( ) => {
65+ this . _internalFileSearchProvider = null ;
66+ this . _proxy . $unregisterProvider ( handle ) ;
67+ } ) ;
68+ }
69+
5970 private _transformScheme ( scheme : string ) : string {
6071 return this . _uriTransformer . transformOutgoingScheme ( scheme ) ;
6172 }
@@ -92,17 +103,6 @@ export class ExtHostSearch implements ExtHostSearchShape {
92103 } ) ;
93104 }
94105
95- registerInternalFileSearchProvider ( scheme : string , provider : SearchService ) : IDisposable {
96- const handle = this . _handlePool ++ ;
97- this . _internalFileSearchProvider = provider ;
98- this . _internalFileSearchHandle = handle ;
99- this . _proxy . $registerFileSearchProvider ( handle , this . _transformScheme ( scheme ) ) ;
100- return toDisposable ( ( ) => {
101- this . _internalFileSearchProvider = null ;
102- this . _proxy . $unregisterProvider ( handle ) ;
103- } ) ;
104- }
105-
106106 $provideFileSearchResults ( handle : number , session : number , rawQuery : IRawFileQuery , token : CancellationToken ) : Promise < ISearchCompleteStats > {
107107 const query = reviveQuery ( rawQuery ) ;
108108 if ( handle === this . _internalFileSearchHandle ) {
0 commit comments