Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)

* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973

* disable strict null check
This commit is contained in:
Anthony Dresser
2019-07-15 22:35:46 -07:00
committed by GitHub
parent f720ec642f
commit 0b7e7ddbf9
2406 changed files with 59140 additions and 35464 deletions

View File

@@ -17,8 +17,8 @@ import { TokenizationResult, TokenizationResult2 } from 'vs/editor/common/core/t
import * as model from 'vs/editor/common/model';
import { LanguageFeatureRegistry } from 'vs/editor/common/modes/languageFeatureRegistry';
import { TokenizationRegistryImpl } from 'vs/editor/common/modes/tokenizationRegistry';
import { IMarkerData } from 'vs/platform/markers/common/markers';
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
import { IMarkerData } from 'vs/platform/markers/common/markers';
/**
* Open ended enum at runtime
@@ -510,6 +510,11 @@ export interface CompletionContext {
*/
export interface CompletionItemProvider {
/**
* @internal
*/
_debugDisplayName?: string;
triggerCharacters?: string[];
/**
* Provide completion items for the given position and document.
@@ -550,6 +555,10 @@ export interface CodeActionContext {
trigger: CodeActionTrigger;
}
export interface CodeActionList extends IDisposable {
readonly actions: ReadonlyArray<CodeAction>;
}
/**
* The code action interface defines the contract between extensions and
* the [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) feature.
@@ -559,7 +568,7 @@ export interface CodeActionProvider {
/**
* Provide commands for the given document and range.
*/
provideCodeActions(model: model.ITextModel, range: Range | Selection, context: CodeActionContext, token: CancellationToken): ProviderResult<CodeAction[]>;
provideCodeActions(model: model.ITextModel, range: Range | Selection, context: CodeActionContext, token: CancellationToken): ProviderResult<CodeActionList>;
/**
* Optional list of CodeActionKinds that this provider returns.
@@ -624,6 +633,10 @@ export interface SignatureHelp {
activeParameter: number;
}
export interface SignatureHelpResult extends IDisposable {
value: SignatureHelp;
}
export enum SignatureHelpTriggerKind {
Invoke = 1,
TriggerCharacter = 2,
@@ -649,7 +662,7 @@ export interface SignatureHelpProvider {
/**
* Provide help for the signature at the given position and document.
*/
provideSignatureHelp(model: model.ITextModel, position: Position, token: CancellationToken, context: SignatureHelpContext): ProviderResult<SignatureHelp>;
provideSignatureHelp(model: model.ITextModel, position: Position, token: CancellationToken, context: SignatureHelpContext): ProviderResult<SignatureHelpResult>;
}
/**
@@ -1000,6 +1013,7 @@ export interface IInplaceReplaceSupportResult {
export interface ILink {
range: IRange;
url?: URI | string;
tooltip?: string;
}
export interface ILinksList {
@@ -1093,7 +1107,6 @@ export interface DocumentColorProvider {
}
export interface SelectionRange {
kind: string;
range: IRange;
}
@@ -1228,19 +1241,7 @@ export interface CommentThreadTemplate {
export interface CommentInfo {
extensionId?: string;
threads: CommentThread[];
commentingRanges?: (IRange[] | CommentingRanges);
reply?: Command;
draftMode?: DraftMode;
template?: CommentThreadTemplate;
}
/**
* @internal
*/
export enum DraftMode {
NotSupported,
InDraft,
NotInDraft
commentingRanges: CommentingRanges;
}
/**
@@ -1280,7 +1281,7 @@ export interface CommentInput {
/**
* @internal
*/
export interface CommentThread2 {
export interface CommentThread {
commentThreadHandle: number;
controllerHandle: number;
extensionId?: string;
@@ -1294,11 +1295,6 @@ export interface CommentThread2 {
collapsibleState?: CommentThreadCollapsibleState;
input?: CommentInput;
onDidChangeInput: Event<CommentInput | undefined>;
acceptInputCommand?: Command;
additionalCommands?: Command[];
deleteCommand?: Command;
onDidChangeAcceptInputCommand: Event<Command | undefined>;
onDidChangeAdditionalCommands: Event<Command[] | undefined>;
onDidChangeRange: Event<IRange>;
onDidChangeLabel: Event<string>;
onDidChangeCollasibleState: Event<CommentThreadCollapsibleState | undefined>;
@@ -1312,30 +1308,6 @@ export interface CommentThread2 {
export interface CommentingRanges {
readonly resource: URI;
ranges: IRange[];
newCommentThreadCallback?: (uri: UriComponents, range: IRange) => Promise<CommentThread | undefined>;
}
/**
* @internal
*/
export interface CommentThread {
extensionId?: string;
threadId: string | null;
resource: string | null;
range: IRange;
comments: Comment[] | undefined;
collapsibleState?: CommentThreadCollapsibleState;
reply?: Command;
isDisposed?: boolean;
contextValue?: string;
}
/**
* @internal
*/
export interface NewCommentAction {
ranges: IRange[];
actions: Command[];
}
/**
@@ -1367,12 +1339,6 @@ export interface Comment {
readonly userName: string;
readonly userIconPath?: string;
readonly contextValue?: string;
readonly canEdit?: boolean;
readonly canDelete?: boolean;
readonly selectCommand?: Command;
readonly editCommand?: Command;
readonly deleteCommand?: Command;
readonly isDraft?: boolean;
readonly commentReactions?: CommentReaction[];
readonly label?: string;
readonly mode?: CommentMode;
@@ -1385,54 +1351,17 @@ export interface CommentThreadChangedEvent {
/**
* Added comment threads.
*/
readonly added: (CommentThread | CommentThread2)[];
readonly added: CommentThread[];
/**
* Removed comment threads.
*/
readonly removed: (CommentThread | CommentThread2)[];
readonly removed: CommentThread[];
/**
* Changed comment threads.
*/
readonly changed: (CommentThread | CommentThread2)[];
/**
* changed draft mode.
*/
readonly draftMode?: DraftMode;
}
/**
* @internal
*/
export interface DocumentCommentProvider {
provideDocumentComments(resource: URI, token: CancellationToken): Promise<CommentInfo | null>;
createNewCommentThread(resource: URI, range: Range, text: string, token: CancellationToken): Promise<CommentThread | null>;
replyToCommentThread(resource: URI, range: Range, thread: CommentThread, text: string, token: CancellationToken): Promise<CommentThread | null>;
editComment(resource: URI, comment: Comment, text: string, token: CancellationToken): Promise<void>;
deleteComment(resource: URI, comment: Comment, token: CancellationToken): Promise<void>;
startDraft?(resource: URI, token: CancellationToken): Promise<void>;
deleteDraft?(resource: URI, token: CancellationToken): Promise<void>;
finishDraft?(resource: URI, token: CancellationToken): Promise<void>;
startDraftLabel?: string;
deleteDraftLabel?: string;
finishDraftLabel?: string;
addReaction?(resource: URI, comment: Comment, reaction: CommentReaction, token: CancellationToken): Promise<void>;
deleteReaction?(resource: URI, comment: Comment, reaction: CommentReaction, token: CancellationToken): Promise<void>;
reactionGroup?: CommentReaction[];
onDidChangeCommentThreads?(): Event<CommentThreadChangedEvent>;
}
/**
* @internal
*/
export interface WorkspaceCommentProvider {
provideWorkspaceComments(token: CancellationToken): Promise<CommentThread[]>;
onDidChangeCommentThreads(): Event<CommentThreadChangedEvent>;
readonly changed: CommentThread[];
}
/**
@@ -1461,15 +1390,21 @@ export interface IWebviewPanelOptions {
readonly retainContextWhenHidden?: boolean;
}
export interface ICodeLensSymbol {
export interface CodeLens {
range: IRange;
id?: string;
command?: Command;
}
export interface CodeLensList {
lenses: CodeLens[];
dispose(): void;
}
export interface CodeLensProvider {
onDidChange?: Event<this>;
provideCodeLenses(model: model.ITextModel, token: CancellationToken): ProviderResult<ICodeLensSymbol[]>;
resolveCodeLens?(model: model.ITextModel, codeLens: ICodeLensSymbol, token: CancellationToken): ProviderResult<ICodeLensSymbol>;
provideCodeLenses(model: model.ITextModel, token: CancellationToken): ProviderResult<CodeLensList>;
resolveCodeLens?(model: model.ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;
}
// --- feature registries ------