mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode e5834d3280fcd04898efeac32b9cf1b893f9b127 (#9385)
* Merge from vscode e5834d3280fcd04898efeac32b9cf1b893f9b127 * distro
This commit is contained in:
55
src/vs/vscode.proposed.d.ts
vendored
55
src/vs/vscode.proposed.d.ts
vendored
@@ -20,7 +20,7 @@ declare module 'vscode' {
|
||||
|
||||
export interface AuthenticationSession {
|
||||
id: string;
|
||||
accessToken(): Promise<string>;
|
||||
getAccessToken(): Thenable<string>;
|
||||
accountName: string;
|
||||
scopes: string[]
|
||||
}
|
||||
@@ -58,13 +58,13 @@ declare module 'vscode' {
|
||||
/**
|
||||
* Returns an array of current sessions.
|
||||
*/
|
||||
getSessions(): Promise<ReadonlyArray<AuthenticationSession>>;
|
||||
getSessions(): Thenable<ReadonlyArray<AuthenticationSession>>;
|
||||
|
||||
/**
|
||||
* Prompts a user to login.
|
||||
*/
|
||||
login(scopes: string[]): Promise<AuthenticationSession>;
|
||||
logout(sessionId: string): Promise<void>;
|
||||
login(scopes: string[]): Thenable<AuthenticationSession>;
|
||||
logout(sessionId: string): Thenable<void>;
|
||||
}
|
||||
|
||||
export namespace authentication {
|
||||
@@ -1273,14 +1273,14 @@ declare module 'vscode' {
|
||||
* in an operation that takes time to complete, your extension may decide to finish the ongoing backup rather
|
||||
* than cancelling it to ensure that VS Code has some valid backup.
|
||||
*/
|
||||
backup(cancellation: CancellationToken): Thenable<boolean>;
|
||||
backup(cancellation: CancellationToken): Thenable<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a custom document for a custom webview editor.
|
||||
*
|
||||
* Custom documents are only used within a given `WebviewCustomEditorProvider`. The lifecycle of a
|
||||
* `WebviewEditorCustomDocument` is managed by VS Code. When more more references remain to a given `WebviewEditorCustomDocument`
|
||||
* Custom documents are only used within a given `CustomEditorProvider`. The lifecycle of a
|
||||
* `CustomDocument` is managed by VS Code. When more more references remain to a given `CustomDocument`
|
||||
* then it is disposed of.
|
||||
*
|
||||
* @param UserDataType Type of custom object that extensions can store on the document.
|
||||
@@ -1297,7 +1297,7 @@ declare module 'vscode' {
|
||||
readonly uri: Uri;
|
||||
|
||||
/**
|
||||
* Event fired when there are no more references to the `WebviewEditorCustomDocument`.
|
||||
* Event fired when there are no more references to the `CustomDocument`.
|
||||
*/
|
||||
readonly onDidDispose: Event<void>;
|
||||
|
||||
@@ -1313,7 +1313,7 @@ declare module 'vscode' {
|
||||
/**
|
||||
* Provider for webview editors that use a custom data model.
|
||||
*
|
||||
* Custom webview editors use [`WebviewEditorCustomDocument`](#WebviewEditorCustomDocument) as their data model.
|
||||
* Custom webview editors use [`CustomDocument`](#CustomDocument) as their data model.
|
||||
* This gives extensions full control over actions such as edit, save, and backup.
|
||||
*
|
||||
* You should use custom text based editors when dealing with binary files or more complex scenarios. For simple text
|
||||
@@ -1321,24 +1321,26 @@ declare module 'vscode' {
|
||||
*/
|
||||
export interface CustomEditorProvider {
|
||||
/**
|
||||
* Create the model for a given
|
||||
* Resolve the model for a given resource.
|
||||
*
|
||||
* @param document Resource being resolved.
|
||||
* @param document Document to resolve.
|
||||
*
|
||||
* @return The capabilities of the resolved document.
|
||||
*/
|
||||
resolveCustomDocument(document: CustomDocument): Thenable<CustomEditorCapabilities>;
|
||||
|
||||
/**
|
||||
* Resolve a webview editor for a given resource.
|
||||
*
|
||||
* To resolve a webview editor, a provider must fill in its initial html content and hook up all
|
||||
* To resolve a webview editor, the provider must fill in its initial html content and hook up all
|
||||
* the event listeners it is interested it. The provider should also take ownership of the passed in `WebviewPanel`.
|
||||
*
|
||||
* @param document Document for resource being resolved.
|
||||
* @param webview Webview being resolved. The provider should take ownership of this webview.
|
||||
* @param document Document for the resource being resolved.
|
||||
* @param webviewPanel Webview to resolve. The provider should take ownership of this webview.
|
||||
*
|
||||
* @return Thenable indicating that the webview editor has been resolved.
|
||||
*/
|
||||
resolveCustomEditor(document: CustomDocument, webview: WebviewPanel): Thenable<void>;
|
||||
resolveCustomEditor(document: CustomDocument, webviewPanel: WebviewPanel): Thenable<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1349,7 +1351,7 @@ declare module 'vscode' {
|
||||
* undo and backup. The provider is responsible for synchronizing text changes between the webview and the `TextDocument`.
|
||||
*
|
||||
* You should use text based webview editors when dealing with text based file formats, such as `xml` or `json`.
|
||||
* For binary files or more specialized use cases, see [WebviewCustomEditorProvider](#WebviewCustomEditorProvider).
|
||||
* For binary files or more specialized use cases, see [CustomEditorProvider](#CustomEditorProvider).
|
||||
*/
|
||||
export interface CustomTextEditorProvider {
|
||||
/**
|
||||
@@ -1359,11 +1361,11 @@ declare module 'vscode' {
|
||||
* the event listeners it is interested it. The provider should also take ownership of the passed in `WebviewPanel`.
|
||||
*
|
||||
* @param document Resource being resolved.
|
||||
* @param webview Webview being resolved. The provider should take ownership of this webview.
|
||||
* @param webviewPanel Webview to resolve. The provider should take ownership of this webview.
|
||||
*
|
||||
* @return Thenable indicating that the webview editor has been resolved.
|
||||
*/
|
||||
resolveCustomTextEditor(document: TextDocument, webview: WebviewPanel): Thenable<void>;
|
||||
resolveCustomTextEditor(document: TextDocument, webviewPanel: WebviewPanel): Thenable<void>;
|
||||
}
|
||||
|
||||
namespace window {
|
||||
@@ -1680,9 +1682,10 @@ declare module 'vscode' {
|
||||
*
|
||||
* The documentation is shown in the code actions menu if either:
|
||||
*
|
||||
* - Code actions of `kind` are requested by VS Code. Note that in this case, we always pick the most specific
|
||||
* documentation. For example, if documentation for both `Refactor` and `RefactorExtract` is provided, and we
|
||||
* request code actions for `RefactorExtract`, we prefer the more specific documentation for `RefactorExtract`.
|
||||
* - Code actions of `kind` are requested by VS Code. In this case, VS Code will show the documentation that
|
||||
* most closely matches the requested code action kind. For example, if a provider has documentation for
|
||||
* both `Refactor` and `RefactorExtract`, when the user requests code actions for `RefactorExtract`,
|
||||
* VS Code will use the documentation for `RefactorExtract` intead of the documentation for `Refactor`.
|
||||
*
|
||||
* - Any code actions of `kind` are returned by the provider.
|
||||
*/
|
||||
@@ -1703,7 +1706,10 @@ declare module 'vscode' {
|
||||
*/
|
||||
export interface OpenDialogOptions {
|
||||
/**
|
||||
* Dialog title
|
||||
* Dialog title.
|
||||
*
|
||||
* Depending on the underlying operating system this parameter might be ignored, since some
|
||||
* systems do not present title on open dialogs.
|
||||
*/
|
||||
title?: string;
|
||||
}
|
||||
@@ -1713,7 +1719,10 @@ declare module 'vscode' {
|
||||
*/
|
||||
export interface SaveDialogOptions {
|
||||
/**
|
||||
* Dialog title
|
||||
* Dialog title.
|
||||
*
|
||||
* Depending on the underlying operating system this parameter might be ignored, since some
|
||||
* systems do not present title on save dialogs.
|
||||
*/
|
||||
title?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user