contextValue property

String? get contextValue

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.

Implementation

_i2.String? get contextValue => _i5.getProperty(
      this,
      'contextValue',
    );
set contextValue (String? value)

Implementation

set contextValue(_i2.String? value) {
  _i5.setProperty(
    this,
    'contextValue',
    value ?? _i6.undefined,
  );
}