more UriComponents in mainThread-land, #40169

This commit is contained in:
Johannes Rieken
2017-12-13 18:00:35 +01:00
parent 7cab470639
commit e50a1f2d02
2 changed files with 13 additions and 13 deletions

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import URI from 'vs/base/common/uri';
import URI, { UriComponents } from 'vs/base/common/uri';
import { TPromise, PPromise } from 'vs/base/common/winjs.base';
import { ExtHostContext, MainContext, IExtHostContext, MainThreadFileSystemShape, ExtHostFileSystemShape } from '../node/extHost.protocol';
import { IFileService, IFileSystemProvider, IStat, IFileChange } from 'vs/platform/files/common/files';
@@ -45,22 +45,22 @@ export class MainThreadFileSystem implements MainThreadFileSystemShape {
this._provider.delete(handle);
}
$onDidAddFileSystemRoot(uri: URI): void {
this._workspaceEditingService.addFolders([{ uri }], true).done(null, onUnexpectedError);
$onDidAddFileSystemRoot(data: UriComponents): void {
this._workspaceEditingService.addFolders([{ uri: URI.revive(data) }], true).done(null, onUnexpectedError);
}
$onFileSystemChange(handle: number, changes: IFileChange[]): void {
this._provider.get(handle).$onFileSystemChange(changes);
}
$reportFileChunk(handle: number, resource: URI, chunk: number[]): void {
this._provider.get(handle).reportFileChunk(resource, chunk);
$reportFileChunk(handle: number, data: UriComponents, chunk: number[]): void {
this._provider.get(handle).reportFileChunk(URI.revive(data), chunk);
}
// --- search
$handleSearchProgress(handle: number, session: number, resource: URI): void {
this._provider.get(handle).handleSearchProgress(session, resource);
$handleSearchProgress(handle: number, session: number, data: UriComponents): void {
this._provider.get(handle).handleSearchProgress(session, URI.revive(data));
}
}