commentProvider can control collapse state of a thread

This commit is contained in:
Peng Lyu
2018-04-20 15:04:00 -07:00
parent e1c6d458a7
commit 5a3c4d1930
10 changed files with 83 additions and 19 deletions

View File

@@ -686,7 +686,9 @@ export function createApiFactory(
FileType: extHostTypes.FileType,
FoldingRangeList: extHostTypes.FoldingRangeList,
FoldingRange: extHostTypes.FoldingRange,
FoldingRangeType: extHostTypes.FoldingRangeType
FoldingRangeType: extHostTypes.FoldingRangeType,
CommentThreadCollapsibleState: extHostTypes.CommentThreadCollapsibleState
};
};
}

View File

@@ -103,6 +103,7 @@ function convertCommentThread(vscodeCommentThread: vscode.CommentThread, command
resource: vscodeCommentThread.resource.toString(),
range: extHostTypeConverter.fromRange(vscodeCommentThread.range),
comments: vscodeCommentThread.comments.map(convertComment),
collapsibleState: vscodeCommentThread.collapsibleState,
reply: vscodeCommentThread.reply ? commandsConverter.toInternal(vscodeCommentThread.reply) : null
};
}

View File

@@ -1868,3 +1868,15 @@ export enum FoldingRangeType {
}
//#endregion
export enum CommentThreadCollapsibleState {
/**
* Determines an item is collapsed
*/
Collapsed = 0,
/**
* Determines an item is expanded
*/
Expanded = 1
}