Add onDidCommentThreadsChange

This commit is contained in:
Rachel Macfarlane
2018-04-17 16:48:32 -07:00
parent 99ce8b1b9f
commit 801d3eaacf
8 changed files with 77 additions and 2 deletions

View File

@@ -37,6 +37,15 @@ export class ExtHostComments implements ExtHostCommentsShape {
this._providers.set(handle, provider);
this._proxy.$registerCommentProvider(handle);
provider.onDidChangeCommentThreads(event => {
this._proxy.$onDidCommentThreadsChange(handle, {
changed: event.changed.map(x => convertCommentThread(x, this._commandsConverter)),
added: event.added.map(x => convertCommentThread(x, this._commandsConverter)),
removed: event.removed.map(x => convertCommentThread(x, this._commandsConverter))
});
});
return {
dispose: () => {
this._proxy.$unregisterCommentProvider(handle);
@@ -45,6 +54,10 @@ export class ExtHostComments implements ExtHostCommentsShape {
};
}
$onDidCommentThreadsChange(handle: number, commentThreadEvent: vscode.CommentThreadChangedEvent) {
return TPromise.as(null);
}
$provideComments(handle: number, uri: UriComponents): TPromise<modes.CommentThread[]> {
const data = this._documents.getDocumentData(URI.revive(uri));
if (!data || !data.document) {