Theia API Documentation v1.77.0
    Preparing search index...

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

    Implements

    Index
    commentHandle: number = 0
    handle: number = ...
    onDidUpdateCommentThread: Event<void> = ...
    • get contextValue(): string | undefined

      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.

      Returns string | undefined

    • set contextValue(context: string | undefined): void

      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.

      Parameters

      • context: string | undefined

      Returns void

    • get range(): Range | undefined

      The range the comment thread is located within the document. The thread icon will be shown at the last line of the range. When set to undefined, the comment will be associated with the file, and not a specific range.

      Returns Range | undefined

    • set range(range: Range | undefined): void

      The range the comment thread is located within the document. The thread icon will be shown at the last line of the range. When set to undefined, the comment will be associated with the file, and not a specific range.

      Parameters

      • range: Range | undefined

      Returns void