Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d (#5949)

* Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d

* Fix vs unit tests and hygiene issue

* Fix strict null check issue
This commit is contained in:
Chris LaFreniere
2019-06-10 18:27:09 -07:00
committed by GitHub
parent ff38bc8143
commit d15a3fcc98
926 changed files with 19529 additions and 11383 deletions

View File

@@ -550,6 +550,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 +563,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.
@@ -1000,6 +1004,7 @@ export interface IInplaceReplaceSupportResult {
export interface ILink {
range: IRange;
url?: URI | string;
tooltip?: string;
}
export interface ILinksList {
@@ -1093,7 +1098,6 @@ export interface DocumentColorProvider {
}
export interface SelectionRange {
kind: string;
range: IRange;
}
@@ -1461,15 +1465,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 ------