Merge from vscode e0762af258c0b20320ed03f3871a41967acc4421 (#7404)

* Merge from vscode e0762af258c0b20320ed03f3871a41967acc4421

* readd svgs
This commit is contained in:
Anthony Dresser
2019-09-27 11:13:19 -07:00
committed by GitHub
parent 6385443a4c
commit 07109617b5
348 changed files with 4219 additions and 4307 deletions

View File

@@ -914,17 +914,15 @@ declare module 'vscode' {
*/
export class CustomExecution2 {
/**
* Constructs a CustomExecution task object. The callback will be executed the task is run, at which point the
* extension should return the Pseudoterminal it will "run in". The task should wait to do further execution until
* [Pseudoterminal.open](#Pseudoterminal.open) is called. Task cancellation should be handled using
* [Pseudoterminal.close](#Pseudoterminal.close). When the task is complete fire
* [Pseudoterminal.onDidClose](#Pseudoterminal.onDidClose).
* @param process The [Pseudoterminal](#Pseudoterminal) to be used by the task to display output.
* @param callback The callback that will be called when the task is started by a user.
*/
constructor(callback: () => Thenable<Pseudoterminal>);
/**
* The callback used to execute the task. Cancellation should be handled using
* [Pseudoterminal.close](#Pseudoterminal.close). When the task is complete fire
* [Pseudoterminal.onDidClose](#Pseudoterminal.onDidClose).
*/
callback: () => Thenable<Pseudoterminal>;
}
/**
@@ -1087,30 +1085,34 @@ declare module 'vscode' {
//#region Custom editors, mjbvz
export enum WebviewEditorState {
export enum WebviewContentState {
/**
* The webview editor's content cannot be modified.
* The webview content cannot be modified.
*
* This disables save
* This disables save.
*/
Readonly = 1,
/**
* The webview editor's content has not been changed but they can be modified and saved.
* The webview content has not been changed but they can be modified and saved.
*/
Unchanged = 2,
/**
* The webview editor's content has been changed and can be saved.
* The webview content has been changed and can be saved.
*/
Dirty = 3,
}
export interface WebviewEditor extends WebviewPanel {
state: WebviewEditorState;
export interface WebviewEditorState {
readonly contentState: WebviewContentState;
}
export interface WebviewPanel {
editorState: WebviewEditorState;
/**
* Fired when the webview editor is saved.
* Fired when the webview is being saved.
*
* Both `Unchanged` and `Dirty` editors can be saved.
*
@@ -1119,6 +1121,11 @@ declare module 'vscode' {
readonly onWillSave: Event<{ waitUntil: (thenable: Thenable<boolean>) => void }>;
}
export interface WebviewEditor extends WebviewPanel {
// TODO: We likely do not want `editorState` and `onWillSave` enabled for
// resource backed webviews
}
export interface WebviewEditorProvider {
/**
* Fills out a `WebviewEditor` for a given resource.