/
CommentThread.hx
66 lines (58 loc) · 1.79 KB
/
CommentThread.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package vscode;
/**
* A collection of [comments](#Comment) representing a conversation at a particular range in a document.
*/
typedef CommentThread = {
/**
* The uri of the document the thread has been created on.
*/
var uri(default, never):Uri;
/**
* The range the comment thread is located within the document. The thread icon will be shown
* at the first line of the range.
*/
var range:Range;
/**
* The ordered comments of the thread.
*/
var comments:ReadOnlyArray<Comment>;
/**
* Whether the thread should be collapsed or expanded when opening the document.
* Defaults to Collapsed.
*/
var collapsibleState:CommentThreadCollapsibleState;
/**
* Whether the thread supports reply.
* Defaults to true.
*/
var canReply:Bool;
/**
* 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`.
*/
var ?contextValue:String;
/**
* The optional human-readable label describing the [Comment Thread](#CommentThread)
*/
var ?label:String;
/**
* Dispose this comment thread.
*
* Once disposed, this comment thread will be removed from visible editors and Comment Panel when appropriate.
*/
function dispose():Void;
}