Options
All
  • Public
  • Public/Protected
  • All
Menu

A collection of comments representing a conversation at a particular range in a document.

层级

  • CommentThread

索引

Properties(7)

Readonly uri

uri: Uri

The uri of the document the thread has been created on.

range

range: Range

The range the comment thread is located within the document. The thread icon will be shown at the first line of the range.

comments

comments: readonly Comment[]

The ordered comments of the thread.

collapsibleState

Whether the thread should be collapsed or expanded when opening the document. Defaults to Collapsed.

canReply

canReply: boolean

Whether the thread supports reply. Defaults to true.

Optional contextValue

contextValue: string

Context value of the comment thread. This can be used to contribute thread specific actions. For example, a comment thread is given a context value as editable. When contributing actions to comments/commentThread/title using menus extension point, you can specify context value for key commentThread in when expression like commentThread == editable.

    "contributes": {
        "menus": {
            "comments/commentThread/title": [
                {
                    "command": "extension.deleteCommentThread",
                    "when": "commentThread == editable"
                }
            ]
        }
    }

This will show action extension.deleteCommentThread only for comment threads with contextValue is editable.

Optional label

label: string

The optional human-readable label describing the Comment Thread

Methods(1)

dispose

  • dispose(): void
  • Dispose this comment thread.

    Once disposed, this comment thread will be removed from visible editors and Comment Panel when appropriate.

    Returns void

友链:VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场

Generated by TypeDoc. Maintained by 洛竹