diff --git a/src/vs/workbench/api/browser/mainThreadFileSystem.ts b/src/vs/workbench/api/browser/mainThreadFileSystem.ts index 042e2264f5f..1e79801f68f 100644 --- a/src/vs/workbench/api/browser/mainThreadFileSystem.ts +++ b/src/vs/workbench/api/browser/mainThreadFileSystem.ts @@ -27,10 +27,10 @@ export class MainThreadFileSystem implements MainThreadFileSystemShape { const infoProxy = extHostContext.getProxy(ExtHostContext.ExtHostFileSystemInfo); for (let entry of _fileService.listCapabilities()) { - infoProxy.$acceptProviderInfos(entry.scheme, entry.capabilities); + infoProxy.$acceptProviderInfos(URI.from({ scheme: entry.scheme, path: '/dummy' }), entry.capabilities); } - this._disposables.add(_fileService.onDidChangeFileSystemProviderRegistrations(e => infoProxy.$acceptProviderInfos(e.scheme, e.provider?.capabilities ?? null))); - this._disposables.add(_fileService.onDidChangeFileSystemProviderCapabilities(e => infoProxy.$acceptProviderInfos(e.scheme, e.provider.capabilities))); + this._disposables.add(_fileService.onDidChangeFileSystemProviderRegistrations(e => infoProxy.$acceptProviderInfos(URI.from({ scheme: e.scheme, path: '/dummy' }), e.provider?.capabilities ?? null))); + this._disposables.add(_fileService.onDidChangeFileSystemProviderCapabilities(e => infoProxy.$acceptProviderInfos(URI.from({ scheme: e.scheme, path: '/dummy' }), e.provider.capabilities))); } dispose(): void { diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index c9f87013bb4..f8ac5bec2fe 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -295,7 +295,7 @@ export interface MainThreadTextEditorsShape extends IDisposable { } export interface MainThreadTreeViewsShape extends IDisposable { - $registerTreeViewDataProvider(treeViewId: string, options: { showCollapseAll: boolean, canSelectMany: boolean, dragAndDropMimeTypes: string[] | undefined}): Promise; + $registerTreeViewDataProvider(treeViewId: string, options: { showCollapseAll: boolean, canSelectMany: boolean, dragAndDropMimeTypes: string[] | undefined }): Promise; $refresh(treeViewId: string, itemsToRefresh?: { [treeItemHandle: string]: ITreeItem; }): Promise; $reveal(treeViewId: string, itemInfo: { item: ITreeItem, parentChain: ITreeItem[] } | undefined, options: IRevealOptions): Promise; $setMessage(treeViewId: string, message: string): void; @@ -1289,7 +1289,7 @@ export interface ExtHostWorkspaceShape { } export interface ExtHostFileSystemInfoShape { - $acceptProviderInfos(scheme: string, capabilities: number | null): void; + $acceptProviderInfos(uri: UriComponents, capabilities: number | null): void; } export interface ExtHostFileSystemShape { diff --git a/src/vs/workbench/api/common/extHostFileSystemInfo.ts b/src/vs/workbench/api/common/extHostFileSystemInfo.ts index d86fd1bf404..2fa583c672e 100644 --- a/src/vs/workbench/api/common/extHostFileSystemInfo.ts +++ b/src/vs/workbench/api/common/extHostFileSystemInfo.ts @@ -5,6 +5,7 @@ import { Schemas } from 'vs/base/common/network'; import { ExtUri, IExtUri } from 'vs/base/common/resources'; +import { UriComponents } from 'vs/base/common/uri'; import { FileSystemProviderCapabilities } from 'vs/platform/files/common/files'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { ExtHostFileSystemInfoShape } from 'vs/workbench/api/common/extHost.protocol'; @@ -33,11 +34,11 @@ export class ExtHostFileSystemInfo implements ExtHostFileSystemInfoShape { }); } - $acceptProviderInfos(scheme: string, capabilities: number | null): void { + $acceptProviderInfos(uri: UriComponents, capabilities: number | null): void { if (capabilities === null) { - this._providerInfo.delete(scheme); + this._providerInfo.delete(uri.scheme); } else { - this._providerInfo.set(scheme, capabilities); + this._providerInfo.set(uri.scheme, capabilities); } }