A comment controller is able to provide {@link CommentThread comments} support to the editor and provide users various ways to interact with comments.
Fields
optionalreactionHandler:Null<(comment:Comment, reaction:CommentReaction) ‑> Thenable<Void>>
Optional reaction handler for creating and deleting reactions on a {@link Comment}.
dispose():Void
Dispose this comment controller.
Once disposed, all {@link CommentThread comment threads} created by this comment controller will also be removed from the editor and Comments Panel.
createCommentThread(uri:Uri, range:Range, comments:Array<Comment>):CommentThread
Create a {@link CommentThread comment thread}. The comment thread will be displayed in visible text editors (if the resource matches) and Comments Panel once created.
Parameters:
uri | The uri of the document the thread has been created on. |
---|---|
range | The range the comment thread is located within the document. |
comments | The ordered comments of the thread. |
optionalcommentingRangeProvider:Null<CommentingRangeProvider>
Optional commenting range provider. Provide a list {@link Range ranges} which support commenting to any given resource uri.
If not provided, users can leave comments in any document opened in the editor.