提交 55de001f 编写于 作者: J Johannes Rieken

migrate MainThreadDecorations, #40169

上级 b64355bf
......@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import URI from 'vs/base/common/uri';
import URI, { UriComponents } from 'vs/base/common/uri';
import { Emitter } from 'vs/base/common/event';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { ExtHostContext, MainContext, IExtHostContext, MainThreadDecorationsShape, ExtHostDecorationsShape } from '../node/extHost.protocol';
......@@ -54,9 +54,9 @@ export class MainThreadDecorations implements MainThreadDecorationsShape {
this._provider.set(handle, [emitter, registration]);
}
$onDidChange(handle: number, resources: URI[]): void {
$onDidChange(handle: number, resources: UriComponents[]): void {
const [emitter] = this._provider.get(handle);
emitter.fire(resources);
emitter.fire(resources.map(URI.revive));
}
$unregisterDecorationProvider(handle: number): void {
......
......@@ -140,7 +140,7 @@ export interface MainThreadDiaglogsShape extends IDisposable {
export interface MainThreadDecorationsShape extends IDisposable {
$registerDecorationProvider(handle: number, label: string): void;
$unregisterDecorationProvider(handle: number): void;
$onDidChange(handle: number, resources: URI[]): void;
$onDidChange(handle: number, resources: UriComponents[]): void;
}
export interface MainThreadDocumentContentProvidersShape extends IDisposable {
......@@ -668,7 +668,7 @@ export const MainContext = {
MainThreadCommands: <ProxyIdentifier<MainThreadCommandsShape>>createMainId<MainThreadCommandsShape>('MainThreadCommands', ProxyType.CustomMarshaller),
MainThreadConfiguration: createMainId<MainThreadConfigurationShape>('MainThreadConfiguration', ProxyType.CustomMarshaller),
MainThreadDebugService: createMainId<MainThreadDebugServiceShape>('MainThreadDebugService', ProxyType.CustomMarshaller),
MainThreadDecorations: createMainId<MainThreadDecorationsShape>('MainThreadDecorations', ProxyType.CustomMarshaller),
MainThreadDecorations: createMainId<MainThreadDecorationsShape>('MainThreadDecorations', ProxyType.NativeJSON),
MainThreadDiagnostics: createMainId<MainThreadDiagnosticsShape>('MainThreadDiagnostics', ProxyType.CustomMarshaller),
MainThreadDialogs: createMainId<MainThreadDiaglogsShape>('MainThreadDiaglogs', ProxyType.CustomMarshaller),
MainThreadDocuments: createMainId<MainThreadDocumentsShape>('MainThreadDocuments'),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册