mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
update comments in editor when a data provider is registered.
This commit is contained in:
@@ -57,28 +57,27 @@ export class MainThreadComments extends Disposable implements MainThreadComments
|
||||
this._commentService.setComments(outerEditorURI, commentInfos.filter(info => info !== null));
|
||||
});
|
||||
|
||||
for (const handle of keys(this._documentProviders)) {
|
||||
_commentService.registerDataProvider(
|
||||
handle,
|
||||
{
|
||||
provideDocumentComments: async (uri, token) => {
|
||||
return this._proxy.$provideDocumentComments(handle, uri);
|
||||
},
|
||||
onDidChangeCommentThreads: null,
|
||||
createNewCommentThread: async (uri, range, text, token) => {
|
||||
return this._proxy.$createNewCommentThread(handle, uri, range, text);
|
||||
},
|
||||
replyToCommentThread: async (uri, range, thread, text, token) => {
|
||||
return this._proxy.$replyToCommentThread(handle, uri, range, thread, text);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$registerDocumentCommentProvider(handle: number): void {
|
||||
this._documentProviders.set(handle, undefined);
|
||||
|
||||
this._commentService.registerDataProvider(
|
||||
handle,
|
||||
{
|
||||
provideDocumentComments: async (uri, token) => {
|
||||
return this._proxy.$provideDocumentComments(handle, uri);
|
||||
},
|
||||
onDidChangeCommentThreads: null,
|
||||
createNewCommentThread: async (uri, range, text, token) => {
|
||||
return this._proxy.$createNewCommentThread(handle, uri, range, text);
|
||||
},
|
||||
replyToCommentThread: async (uri, range, thread, text, token) => {
|
||||
return this._proxy.$replyToCommentThread(handle, uri, range, thread, text);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
$registerWorkspaceCommentProvider(handle: number): void {
|
||||
|
||||
Reference in New Issue
Block a user