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

more UriComponents in mainThread-land, #40169

上级 7cab4706
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
'use strict'; '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 { TPromise, PPromise } from 'vs/base/common/winjs.base';
import { ExtHostContext, MainContext, IExtHostContext, MainThreadFileSystemShape, ExtHostFileSystemShape } from '../node/extHost.protocol'; import { ExtHostContext, MainContext, IExtHostContext, MainThreadFileSystemShape, ExtHostFileSystemShape } from '../node/extHost.protocol';
import { IFileService, IFileSystemProvider, IStat, IFileChange } from 'vs/platform/files/common/files'; import { IFileService, IFileSystemProvider, IStat, IFileChange } from 'vs/platform/files/common/files';
...@@ -45,22 +45,22 @@ export class MainThreadFileSystem implements MainThreadFileSystemShape { ...@@ -45,22 +45,22 @@ export class MainThreadFileSystem implements MainThreadFileSystemShape {
this._provider.delete(handle); this._provider.delete(handle);
} }
$onDidAddFileSystemRoot(uri: URI): void { $onDidAddFileSystemRoot(data: UriComponents): void {
this._workspaceEditingService.addFolders([{ uri }], true).done(null, onUnexpectedError); this._workspaceEditingService.addFolders([{ uri: URI.revive(data) }], true).done(null, onUnexpectedError);
} }
$onFileSystemChange(handle: number, changes: IFileChange[]): void { $onFileSystemChange(handle: number, changes: IFileChange[]): void {
this._provider.get(handle).$onFileSystemChange(changes); this._provider.get(handle).$onFileSystemChange(changes);
} }
$reportFileChunk(handle: number, resource: URI, chunk: number[]): void { $reportFileChunk(handle: number, data: UriComponents, chunk: number[]): void {
this._provider.get(handle).reportFileChunk(resource, chunk); this._provider.get(handle).reportFileChunk(URI.revive(data), chunk);
} }
// --- search // --- search
$handleSearchProgress(handle: number, session: number, resource: URI): void { $handleSearchProgress(handle: number, session: number, data: UriComponents): void {
this._provider.get(handle).handleSearchProgress(session, resource); this._provider.get(handle).handleSearchProgress(session, URI.revive(data));
} }
} }
......
...@@ -329,11 +329,11 @@ export interface MainThreadFileSystemShape extends IDisposable { ...@@ -329,11 +329,11 @@ export interface MainThreadFileSystemShape extends IDisposable {
$registerFileSystemProvider(handle: number, scheme: string): void; $registerFileSystemProvider(handle: number, scheme: string): void;
$unregisterFileSystemProvider(handle: number): void; $unregisterFileSystemProvider(handle: number): void;
$onDidAddFileSystemRoot(root: URI): void; $onDidAddFileSystemRoot(root: UriComponents): void;
$onFileSystemChange(handle: number, resource: IFileChange[]): void; $onFileSystemChange(handle: number, resource: IFileChange[]): void;
$reportFileChunk(handle: number, resource: URI, chunk: number[] | null): void; $reportFileChunk(handle: number, resource: UriComponents, chunk: number[] | null): void;
$handleSearchProgress(handle: number, session: number, resource: URI): void; $handleSearchProgress(handle: number, session: number, resource: UriComponents): void;
} }
export interface MainThreadTaskShape extends IDisposable { export interface MainThreadTaskShape extends IDisposable {
...@@ -672,7 +672,7 @@ export const MainContext = { ...@@ -672,7 +672,7 @@ export const MainContext = {
MainThreadDiagnostics: createMainId<MainThreadDiagnosticsShape>('MainThreadDiagnostics'), MainThreadDiagnostics: createMainId<MainThreadDiagnosticsShape>('MainThreadDiagnostics'),
MainThreadDialogs: createMainId<MainThreadDiaglogsShape>('MainThreadDiaglogs'), MainThreadDialogs: createMainId<MainThreadDiaglogsShape>('MainThreadDiaglogs'),
MainThreadDocuments: createMainId<MainThreadDocumentsShape>('MainThreadDocuments'), MainThreadDocuments: createMainId<MainThreadDocumentsShape>('MainThreadDocuments'),
MainThreadDocumentContentProviders: createMainId<MainThreadDocumentContentProvidersShape>('MainThreadDocumentContentProviders', ProxyType.CustomMarshaller), MainThreadDocumentContentProviders: createMainId<MainThreadDocumentContentProvidersShape>('MainThreadDocumentContentProviders'),
MainThreadEditors: createMainId<MainThreadEditorsShape>('MainThreadEditors'), MainThreadEditors: createMainId<MainThreadEditorsShape>('MainThreadEditors'),
MainThreadErrors: createMainId<MainThreadErrorsShape>('MainThreadErrors'), MainThreadErrors: createMainId<MainThreadErrorsShape>('MainThreadErrors'),
MainThreadTreeViews: createMainId<MainThreadTreeViewsShape>('MainThreadTreeViews'), MainThreadTreeViews: createMainId<MainThreadTreeViewsShape>('MainThreadTreeViews'),
...@@ -683,11 +683,11 @@ export const MainContext = { ...@@ -683,11 +683,11 @@ export const MainContext = {
MainThreadProgress: createMainId<MainThreadProgressShape>('MainThreadProgress'), MainThreadProgress: createMainId<MainThreadProgressShape>('MainThreadProgress'),
MainThreadQuickOpen: createMainId<MainThreadQuickOpenShape>('MainThreadQuickOpen'), MainThreadQuickOpen: createMainId<MainThreadQuickOpenShape>('MainThreadQuickOpen'),
MainThreadStatusBar: createMainId<MainThreadStatusBarShape>('MainThreadStatusBar'), MainThreadStatusBar: createMainId<MainThreadStatusBarShape>('MainThreadStatusBar'),
MainThreadStorage: createMainId<MainThreadStorageShape>('MainThreadStorage', ProxyType.CustomMarshaller), MainThreadStorage: createMainId<MainThreadStorageShape>('MainThreadStorage'),
MainThreadTelemetry: createMainId<MainThreadTelemetryShape>('MainThreadTelemetry'), MainThreadTelemetry: createMainId<MainThreadTelemetryShape>('MainThreadTelemetry'),
MainThreadTerminalService: createMainId<MainThreadTerminalServiceShape>('MainThreadTerminalService'), MainThreadTerminalService: createMainId<MainThreadTerminalServiceShape>('MainThreadTerminalService'),
MainThreadWorkspace: createMainId<MainThreadWorkspaceShape>('MainThreadWorkspace'), MainThreadWorkspace: createMainId<MainThreadWorkspaceShape>('MainThreadWorkspace'),
MainThreadFileSystem: createMainId<MainThreadFileSystemShape>('MainThreadFileSystem', ProxyType.CustomMarshaller), MainThreadFileSystem: createMainId<MainThreadFileSystemShape>('MainThreadFileSystem'),
MainThreadExtensionService: createMainId<MainThreadExtensionServiceShape>('MainThreadExtensionService'), MainThreadExtensionService: createMainId<MainThreadExtensionServiceShape>('MainThreadExtensionService'),
MainThreadSCM: createMainId<MainThreadSCMShape>('MainThreadSCM', ProxyType.CustomMarshaller), MainThreadSCM: createMainId<MainThreadSCMShape>('MainThreadSCM', ProxyType.CustomMarshaller),
MainThreadTask: createMainId<MainThreadTaskShape>('MainThreadTask', ProxyType.CustomMarshaller), MainThreadTask: createMainId<MainThreadTaskShape>('MainThreadTask', ProxyType.CustomMarshaller),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册