提交 f89950d6 编写于 作者: R Rachel Macfarlane

Mark required properties as required on comments providers

上级 29449056
......@@ -620,17 +620,14 @@ declare module 'vscode' {
interface DocumentCommentProvider {
provideDocumentComments(document: TextDocument, token: CancellationToken): Promise<CommentInfo>;
createNewCommentThread?(document: TextDocument, range: Range, text: string, token: CancellationToken): Promise<CommentThread>;
replyToCommentThread?(document: TextDocument, range: Range, commentThread: CommentThread, text: string, token: CancellationToken): Promise<CommentThread>;
onDidChangeCommentThreads?: Event<CommentThreadChangedEvent>;
createNewCommentThread(document: TextDocument, range: Range, text: string, token: CancellationToken): Promise<CommentThread>;
replyToCommentThread(document: TextDocument, range: Range, commentThread: CommentThread, text: string, token: CancellationToken): Promise<CommentThread>;
onDidChangeCommentThreads: Event<CommentThreadChangedEvent>;
}
interface WorkspaceCommentProvider {
provideWorkspaceComments(token: CancellationToken): Promise<CommentThread[]>;
createNewCommentThread?(document: TextDocument, range: Range, text: string, token: CancellationToken): Promise<CommentThread>;
replyToCommentThread?(document: TextDocument, range: Range, commentThread: CommentThread, text: string, token: CancellationToken): Promise<CommentThread>;
onDidChangeCommentThreads?: Event<CommentThreadChangedEvent>;
onDidChangeCommentThreads: Event<CommentThreadChangedEvent>;
}
namespace workspace {
......
......@@ -988,8 +988,8 @@ export interface ExtHostProgressShape {
export interface ExtHostCommentsShape {
$provideDocumentComments(handle: number, document: UriComponents): Thenable<modes.CommentInfo>;
$createNewCommentThread?(handle: number, document: UriComponents, range: IRange, text: string): Thenable<modes.CommentThread>;
$replyToCommentThread?(handle: number, document: UriComponents, range: IRange, commentThread: modes.CommentThread, text: string): Thenable<modes.CommentThread>;
$createNewCommentThread(handle: number, document: UriComponents, range: IRange, text: string): Thenable<modes.CommentThread>;
$replyToCommentThread(handle: number, document: UriComponents, range: IRange, commentThread: modes.CommentThread, text: string): Thenable<modes.CommentThread>;
$provideWorkspaceComments(handle: number): Thenable<modes.CommentThread[]>;
}
......
......@@ -5,7 +5,7 @@
'use strict';
import { CommentThread, DocumentCommentProvider, CommentThreadChangedEvent, CommentInfo, WorkspaceCommentProvider } from 'vs/editor/common/modes';
import { CommentThread, DocumentCommentProvider, CommentThreadChangedEvent, CommentInfo } from 'vs/editor/common/modes';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { Event, Emitter } from 'vs/base/common/event';
import { Disposable } from 'vs/base/common/lifecycle';
......@@ -37,7 +37,7 @@ export interface ICommentService {
setDocumentComments(resource: URI, commentInfos: CommentInfo[]): void;
setWorkspaceComments(owner: number, commentsByResource: CommentThread[]): void;
removeWorkspaceComments(owner: number): void;
registerDataProvider(owner: number, commentProvider: DocumentCommentProvider | WorkspaceCommentProvider): void;
registerDataProvider(owner: number, commentProvider: DocumentCommentProvider): void;
unregisterDataProvider(owner: number): void;
updateComments(event: CommentThreadChangedEvent): void;
createNewCommentThread(owner: number, resource: URI, range: Range, text: string): TPromise<CommentThread>;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册