You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extensions should be able to handle edits and deletes to comments within the editor. The DocumentCommentProvider can be extended to add these new methods, mimicking the other methods on the provider.
interfaceDocumentCommentProvider{provideDocumentComments(document: TextDocument,token: CancellationToken): Promise<CommentInfo>;createNewCommentThread(document: TextDocument,range: Range,text: string,token: CancellationToken): Promise<CommentThread>;replyToCommentThread(document: TextDocument,range: Range,commentThread: CommentThread,text: string,token: CancellationToken): Promise<CommentThread>;/** * Called when a user edits the comment body to the be new text text. */editComment?(document: TextDocument,comment: Comment,text: string,token: CancellationToken): Promise<Comment>;/** * Called when a user deletes the comment. */deleteComment?(document: TextDocument,comment: Comment,token: CancellationToken): Promise<void>;onDidChangeCommentThreads?: Event<CommentThreadChangedEvent>;}
Additionally, comments themselves need a flag indicating whether or not they can be edited or deleted.
interfaceComment{<existingproperties>/** * Whether the current user has permission to edit the comment. * * This will be treated as false if the comment is provided by a `WorkspaceCommentProvider`, or * if it is provided by a `DocumentCommentProvider` and no `editComment` method is given. */canEdit?: boolean;/** * Whether the current user has permission to delete the comment. * * This will be treated as false if the comment is provided by a `WorkspaceCommentProvider`, or * if it is provided by a `DocumentCommentProvider` and no `deleteComment` method is given. */canDelete?: boolean;}
The text was updated successfully, but these errors were encountered:
Extensions should be able to handle edits and deletes to comments within the editor. The
DocumentCommentProvider
can be extended to add these new methods, mimicking the other methods on the provider.Additionally, comments themselves need a flag indicating whether or not they can be edited or deleted.
The text was updated successfully, but these errors were encountered: