A comment controller is able to provide {@link CommentThread comments} support to the editor and provide users various ways to interact with comments.

Fields

@:optionaloptionalreactionHandler:Null<(comment:Comment, reaction:CommentReaction) ‑> Thenable<Void>>

Optional reaction handler for creating and deleting reactions on a {@link Comment}.

@:optionaloptionaloptions:Null<CommentOptions>

Comment controller options

read onlylabel:String

The human-readable label of this comment controller.

read onlyid:String

The id of this comment controller.

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.

@:optionaloptionalcommentingRangeProvider: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.