Merge from vscode 7653d836944892f83ce9e1f95c1204bafa1aec31

This commit is contained in:
ADS Merger
2020-05-08 03:58:34 +00:00
parent dac1970c43
commit fa62ec1f34
209 changed files with 5131 additions and 2480 deletions

View File

@@ -930,103 +930,6 @@ declare module 'vscode' {
//#endregion
//#region Contribute to terminal environment https://github.com/microsoft/vscode/issues/46696
export enum EnvironmentVariableMutatorType {
/**
* Replace the variable's existing value.
*/
Replace = 1,
/**
* Append to the end of the variable's existing value.
*/
Append = 2,
/**
* Prepend to the start of the variable's existing value.
*/
Prepend = 3
}
export interface EnvironmentVariableMutator {
/**
* The type of mutation that will occur to the variable.
*/
readonly type: EnvironmentVariableMutatorType;
/**
* The value to use for the variable.
*/
readonly value: string;
}
/**
* A collection of mutations that an extension can apply to a process environment.
*/
export interface EnvironmentVariableCollection {
/**
* Whether the collection should be cached for the workspace and applied to the terminal
* across window reloads. When true the collection will be active immediately such when the
* window reloads. Additionally, this API will return the cached version if it exists. The
* collection will be invalidated when the extension is uninstalled or when the collection
* is cleared. Defaults to true.
*/
persistent: boolean;
/**
* Replace an environment variable with a value.
*
* Note that an extension can only make a single change to any one variable, so this will
* overwrite any previous calls to replace, append or prepend.
*/
replace(variable: string, value: string): void;
/**
* Append a value to an environment variable.
*
* Note that an extension can only make a single change to any one variable, so this will
* overwrite any previous calls to replace, append or prepend.
*/
append(variable: string, value: string): void;
/**
* Prepend a value to an environment variable.
*
* Note that an extension can only make a single change to any one variable, so this will
* overwrite any previous calls to replace, append or prepend.
*/
prepend(variable: string, value: string): void;
/**
* Gets the mutator that this collection applies to a variable, if any.
*/
get(variable: string): EnvironmentVariableMutator | undefined;
/**
* Iterate over each mutator in this collection.
*/
forEach(callback: (variable: string, mutator: EnvironmentVariableMutator, collection: EnvironmentVariableCollection) => any, thisArg?: any): void;
/**
* Deletes this collection's mutator for a variable.
*/
delete(variable: string): void;
/**
* Clears all mutators from this collection.
*/
clear(): void;
}
export interface ExtensionContext {
/**
* Gets the extension's environment variable collection for this workspace, enabling changes
* to be applied to terminal environment variables.
*/
readonly environmentVariableCollection: EnvironmentVariableCollection;
}
//#endregion
//#region @jrieken -> exclusive document filters
export interface DocumentFilter {
@@ -1737,12 +1640,6 @@ declare module 'vscode' {
edit(callback: (editBuilder: NotebookEditorCellEdit) => void): Thenable<boolean>;
}
export interface NotebookProvider {
resolveNotebook(editor: NotebookEditor): Promise<void>;
executeCell(document: NotebookDocument, cell: NotebookCell | undefined, token: CancellationToken): Promise<void>;
save(document: NotebookDocument): Promise<boolean>;
}
export interface NotebookOutputSelector {
type: string;
subTypes?: string[];
@@ -1805,11 +1702,6 @@ declare module 'vscode' {
provider: NotebookContentProvider
): Disposable;
export function registerNotebookProvider(
notebookType: string,
provider: NotebookProvider
): Disposable;
export function registerNotebookOutputRenderer(
type: string,
outputSelector: NotebookOutputSelector,
@@ -1839,6 +1731,43 @@ declare module 'vscode' {
//#endregion
//#region @connor4312 extension mode: https://github.com/microsoft/vscode/issues/95926
/**
* The ExtensionMode is provided on the `ExtensionContext` and indicates the
* mode the specific extension is running in.
*/
export enum ExtensionMode {
/**
* The extension is installed normally (for example, from the marketplace
* or VSIX) in VS Code.
*/
Release = 1,
/**
* The extension is running from an `--extensionDevelopmentPath` provided
* when launching VS Code.
*/
Development = 2,
/**
* The extension is running from an `--extensionDevelopmentPath` and
* the extension host is running unit tests.
*/
Test = 3,
}
export interface ExtensionContext {
/**
* The mode the extension is running in. This is specific to the current
* extension. One extension may be in `ExtensionMode.Development` while
* other extensions in the host run in `ExtensionMode.Release`.
*/
readonly extensionMode: ExtensionMode;
}
//#endregion
//#region https://github.com/microsoft/vscode/issues/39441
export interface CompletionItem {