Remove activeCommentThread from extHost comments, set context keys on simple comment editor

This commit is contained in:
Rachel Macfarlane
2019-05-17 16:52:27 -07:00
parent 537d88f7b1
commit 925426e8b0
8 changed files with 28 additions and 90 deletions

View File

@@ -126,17 +126,6 @@ export class ExtHostComments implements ExtHostCommentsShape {
return Promise.resolve(commentControllerHandle);
}
$onActiveCommentThreadChange(commentControllerHandle: number, threadHandle: number): Promise<number | undefined> {
const commentController = this._commentControllers.get(commentControllerHandle);
if (!commentController) {
return Promise.resolve(undefined);
}
commentController.$onActiveCommentThreadChange(threadHandle);
return Promise.resolve(threadHandle);
}
$provideCommentingRanges(commentControllerHandle: number, uriComponents: UriComponents, token: CancellationToken): Promise<IRange[] | undefined> {
const commentController = this._commentControllers.get(commentControllerHandle);
@@ -644,15 +633,6 @@ class ExtHostCommentController implements vscode.CommentController {
}
public inputBox: ExtHostCommentInputBox | undefined;
private _activeCommentThread: ExtHostCommentThread | undefined;
public get activeCommentThread(): ExtHostCommentThread | undefined {
if (this._activeCommentThread && this._activeCommentThread.isDisposed) {
this._activeCommentThread = undefined;
}
return this._activeCommentThread;
}
public activeCommentingRange?: vscode.Range;
@@ -716,10 +696,6 @@ class ExtHostCommentController implements vscode.CommentController {
}
}
$onActiveCommentThreadChange(threadHandle: number) {
this._activeCommentThread = this.getCommentThread(threadHandle);
}
getCommentThread(handle: number) {
return this._threads.get(handle);
}