mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Add active comment thread.
This commit is contained in:
@@ -99,6 +99,17 @@ 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);
|
||||
|
||||
@@ -563,6 +574,7 @@ class ExtHostCommentController implements vscode.CommentController {
|
||||
}
|
||||
|
||||
public inputBox: ExtHostCommentInputBox | undefined;
|
||||
public activeCommentThread: ExtHostCommentThread | undefined;
|
||||
public activeCommentingRange?: vscode.Range;
|
||||
|
||||
public get handle(): number {
|
||||
@@ -610,6 +622,10 @@ class ExtHostCommentController implements vscode.CommentController {
|
||||
}
|
||||
}
|
||||
|
||||
$onActiveCommentThreadChange(threadHandle: number) {
|
||||
this.activeCommentThread = this.getCommentThread(threadHandle);
|
||||
}
|
||||
|
||||
getCommentThread(handle: number) {
|
||||
return this._threads.get(handle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user