mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Add onDidCommentThreadsChange
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user