Refactoring comment service to not be keyed on handle

This commit is contained in:
Rachel Macfarlane
2018-11-08 10:45:15 -08:00
parent 88bb48278d
commit af1b4ebded
9 changed files with 132 additions and 88 deletions

View File

@@ -146,7 +146,6 @@ export class ExtHostComments implements ExtHostCommentsShape {
provider.onDidChangeCommentThreads(event => {
this._proxy.$onDidCommentThreadsChange(handle, {
owner: handle,
changed: event.changed.map(thread => convertToCommentThread(provider, thread, this._commandsConverter)),
added: event.added.map(thread => convertToCommentThread(provider, thread, this._commandsConverter)),
removed: event.removed.map(thread => convertToCommentThread(provider, thread, this._commandsConverter))
@@ -157,7 +156,6 @@ export class ExtHostComments implements ExtHostCommentsShape {
function convertCommentInfo(owner: number, provider: vscode.DocumentCommentProvider, vscodeCommentInfo: vscode.CommentInfo, commandsConverter: CommandsConverter): modes.CommentInfo {
return {
owner: owner,
threads: vscodeCommentInfo.threads.map(x => convertToCommentThread(provider, x, commandsConverter)),
commentingRanges: vscodeCommentInfo.commentingRanges ? vscodeCommentInfo.commentingRanges.map(range => extHostTypeConverter.Range.from(range)) : []
};