mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
comment service fetch
This commit is contained in:
@@ -833,7 +833,7 @@ export interface ExtHostProgressShape {
|
||||
|
||||
export interface ExtHostCommentsShape {
|
||||
$provideComments(handle: number, document: UriComponents): TPromise<modes.CommentThread[]>;
|
||||
$provideNewCommentRange(handle: number, document: UriComponents): TPromise<modes.NewCommentAction>;
|
||||
$provideNewCommentRange(handle: number, document: UriComponents): TPromise<modes.NewCommentAction[]>;
|
||||
$provideAllComments(handle: number): TPromise<modes.CommentThread[]>;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ export class ExtHostComments implements ExtHostCommentsShape {
|
||||
}
|
||||
|
||||
|
||||
$provideNewCommentRange(handle: number, uri: UriComponents): TPromise<modes.NewCommentAction> {
|
||||
$provideNewCommentRange(handle: number, uri: UriComponents): TPromise<modes.NewCommentAction[]> {
|
||||
const data = this._documents.getDocumentData(URI.revive(uri));
|
||||
if (!data || !data.document) {
|
||||
return TPromise.as(null);
|
||||
@@ -97,8 +97,7 @@ export class ExtHostComments implements ExtHostCommentsShape {
|
||||
let provider = this._providers.get(handle);
|
||||
return provider.provideNewCommentRange(data.document, token);
|
||||
})
|
||||
.then(newCommentAction => convertNewCommandAction(newCommentAction, this._commandsConverter));
|
||||
|
||||
.then(newCommentActions => newCommentActions.map(newCommentAction => convertNewCommandAction(newCommentAction, this._commandsConverter)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user