提交 d014618f 编写于 作者: J Johannes Rieken

remote - some renames, prep for more search

上级 8ae2f5f2
......@@ -59,8 +59,8 @@ export class MainThreadFileSystem implements MainThreadFileSystemShape {
// --- search
$handleSearchProgress(handle: number, session: number, data: UriComponents): void {
this._provider.get(handle).handleSearchProgress(session, URI.revive(data));
$handleDidFindFile(handle: number, session: number, data: UriComponents): void {
this._provider.get(handle).hanelDidFindFile(session, URI.revive(data));
}
}
......@@ -155,7 +155,12 @@ class RemoteFileSystemProvider implements IFileSystemProvider, ISearchResultProv
search(query: ISearchQuery): PPromise<ISearchComplete, ISearchProgressItem> {
if (query.type === QueryType.Text) {
return PPromise.as<ISearchComplete>({ results: [], stats: undefined });
} else {
return this._findFiles(query);
}
}
private _findFiles(query: ISearchQuery): PPromise<ISearchComplete, ISearchProgressItem> {
const id = ++this._searchesIdPool;
const matches: IFileMatch[] = [];
return new PPromise((resolve, reject, report) => {
......@@ -175,7 +180,7 @@ class RemoteFileSystemProvider implements IFileSystemProvider, ISearchResultProv
});
}
handleSearchProgress(session: number, resource: URI): void {
hanelDidFindFile(session: number, resource: URI): void {
this._searches.get(session)(resource);
}
}
......@@ -373,7 +373,7 @@ export interface MainThreadFileSystemShape extends IDisposable {
$onFileSystemChange(handle: number, resource: IFileChange[]): void;
$reportFileChunk(handle: number, session: number, chunk: number[] | null): void;
$handleSearchProgress(handle: number, session: number, resource: UriComponents): void;
$handleDidFindFile(handle: number, session: number, resource: UriComponents): void;
}
export interface MainThreadTaskShape extends IDisposable {
......
......@@ -79,7 +79,7 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape {
if (!provider.findFiles) {
return TPromise.as(undefined);
}
const progress = { report: (uri) => this._proxy.$handleSearchProgress(handle, session, uri) };
const progress = { report: (uri) => this._proxy.$handleDidFindFile(handle, session, uri) };
return asWinJsPromise(token => provider.findFiles(query, progress, token));
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册