mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-09 17:52:34 -05:00
Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c (#8525)
* Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c * remove files we don't want * fix hygiene * update distro * update distro * fix hygiene * fix strict nulls * distro * distro * fix tests * fix tests * add another edit * fix viewlet icon * fix azure dialog * fix some padding * fix more padding issues
This commit is contained in:
320
src/vs/vscode.d.ts
vendored
320
src/vs/vscode.d.ts
vendored
@@ -128,7 +128,7 @@ declare module 'vscode' {
|
||||
readonly isDirty: boolean;
|
||||
|
||||
/**
|
||||
* `true` if the document have been closed. A closed document isn't synchronized anymore
|
||||
* `true` if the document has been closed. A closed document isn't synchronized anymore
|
||||
* and won't be re-used when the same resource is opened again.
|
||||
*/
|
||||
readonly isClosed: boolean;
|
||||
@@ -2009,8 +2009,9 @@ declare module 'vscode' {
|
||||
/**
|
||||
* Base kind for source actions: `source`
|
||||
*
|
||||
* Source code actions apply to the entire file and can be run on save
|
||||
* using `editor.codeActionsOnSave`. They also are shown in `source` context menu.
|
||||
* Source code actions apply to the entire file. They must be explicitly requested and will not show in the
|
||||
* normal [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) menu. Source actions
|
||||
* can be run on save using `editor.codeActionsOnSave` and are also shown in the `source` context menu.
|
||||
*/
|
||||
static readonly Source: CodeActionKind;
|
||||
|
||||
@@ -2967,6 +2968,17 @@ declare module 'vscode' {
|
||||
*/
|
||||
appendPlaceholder(value: string | ((snippet: SnippetString) => any), number?: number): SnippetString;
|
||||
|
||||
/**
|
||||
* Builder-function that appends a choice (`${1|a,b,c}`) to
|
||||
* the [`value`](#SnippetString.value) of this snippet string.
|
||||
*
|
||||
* @param values The values for choices - the array of strings
|
||||
* @param number The number of this tabstop, defaults to an auto-increment
|
||||
* value starting at 1.
|
||||
* @return This snippet string.
|
||||
*/
|
||||
appendChoice(values: string[], number?: number): SnippetString;
|
||||
|
||||
/**
|
||||
* Builder-function that appends a variable (`${VAR}`) to
|
||||
* the [`value`](#SnippetString.value) of this snippet string.
|
||||
@@ -3003,6 +3015,9 @@ declare module 'vscode' {
|
||||
* be a range or a range and a placeholder text. The placeholder text should be the identifier of the symbol
|
||||
* which is being renamed - when omitted the text in the returned range is used.
|
||||
*
|
||||
* *Note: * This function should throw an error or return a rejected thenable when the provided location
|
||||
* doesn't allow for a rename.
|
||||
*
|
||||
* @param document The document in which rename will be invoked.
|
||||
* @param position The position at which rename will be invoked.
|
||||
* @param token A cancellation token.
|
||||
@@ -3877,6 +3892,149 @@ declare module 'vscode' {
|
||||
provideSelectionRanges(document: TextDocument, positions: Position[], token: CancellationToken): ProviderResult<SelectionRange[]>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents programming constructs like functions or constructors in the context
|
||||
* of call hierarchy.
|
||||
*/
|
||||
export class CallHierarchyItem {
|
||||
/**
|
||||
* The name of this item.
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* The kind of this item.
|
||||
*/
|
||||
kind: SymbolKind;
|
||||
|
||||
/**
|
||||
* Tags for this item.
|
||||
*/
|
||||
tags?: ReadonlyArray<SymbolTag>;
|
||||
|
||||
/**
|
||||
* More detail for this item, e.g. the signature of a function.
|
||||
*/
|
||||
detail?: string;
|
||||
|
||||
/**
|
||||
* The resource identifier of this item.
|
||||
*/
|
||||
uri: Uri;
|
||||
|
||||
/**
|
||||
* The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.
|
||||
*/
|
||||
range: Range;
|
||||
|
||||
/**
|
||||
* The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function.
|
||||
* Must be contained by the [`range`](#CallHierarchyItem.range).
|
||||
*/
|
||||
selectionRange: Range;
|
||||
|
||||
/**
|
||||
* Creates a new call hierarchy item.
|
||||
*/
|
||||
constructor(kind: SymbolKind, name: string, detail: string, uri: Uri, range: Range, selectionRange: Range);
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents an incoming call, e.g. a caller of a method or constructor.
|
||||
*/
|
||||
export class CallHierarchyIncomingCall {
|
||||
|
||||
/**
|
||||
* The item that makes the call.
|
||||
*/
|
||||
from: CallHierarchyItem;
|
||||
|
||||
/**
|
||||
* The range at which at which the calls appears. This is relative to the caller
|
||||
* denoted by [`this.from`](#CallHierarchyIncomingCall.from).
|
||||
*/
|
||||
fromRanges: Range[];
|
||||
|
||||
/**
|
||||
* Create a new call object.
|
||||
*
|
||||
* @param item The item making the call.
|
||||
* @param fromRanges The ranges at which the calls appear.
|
||||
*/
|
||||
constructor(item: CallHierarchyItem, fromRanges: Range[]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.
|
||||
*/
|
||||
export class CallHierarchyOutgoingCall {
|
||||
|
||||
/**
|
||||
* The item that is called.
|
||||
*/
|
||||
to: CallHierarchyItem;
|
||||
|
||||
/**
|
||||
* The range at which this item is called. This is the range relative to the caller, e.g the item
|
||||
* passed to [`provideCallHierarchyOutgoingCalls`](#CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls)
|
||||
* and not [`this.to`](#CallHierarchyOutgoingCall.to).
|
||||
*/
|
||||
fromRanges: Range[];
|
||||
|
||||
/**
|
||||
* Create a new call object.
|
||||
*
|
||||
* @param item The item being called
|
||||
* @param fromRanges The ranges at which the calls appear.
|
||||
*/
|
||||
constructor(item: CallHierarchyItem, fromRanges: Range[]);
|
||||
}
|
||||
|
||||
/**
|
||||
* The call hierarchy provider interface describes the constract between extensions
|
||||
* and the call hierarchy feature which allows to browse calls and caller of function,
|
||||
* methods, constructor etc.
|
||||
*/
|
||||
export interface CallHierarchyProvider {
|
||||
|
||||
/**
|
||||
* Bootstraps call hierarchy by returning the item that is denoted by the given document
|
||||
* and position. This item will be used as entry into the call graph. Providers should
|
||||
* return `undefined` or `null` when there is no item at the given location.
|
||||
*
|
||||
* @param document The document in which the command was invoked.
|
||||
* @param position The position at which the command was invoked.
|
||||
* @param token A cancellation token.
|
||||
* @returns A call hierarchy item or a thenable that resolves to such. The lack of a result can be
|
||||
* signaled by returning `undefined` or `null`.
|
||||
*/
|
||||
prepareCallHierarchy(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<CallHierarchyItem>;
|
||||
|
||||
/**
|
||||
* Provide all incoming calls for an item, e.g all callers for a method. In graph terms this describes directed
|
||||
* and annotated edges inside the call graph, e.g the given item is the starting node and the result is the nodes
|
||||
* that can be reached.
|
||||
*
|
||||
* @param item The hierarchy item for which incoming calls should be computed.
|
||||
* @param token A cancellation token.
|
||||
* @returns A set of incoming calls or a thenable that resolves to such. The lack of a result can be
|
||||
* signaled by returning `undefined` or `null`.
|
||||
*/
|
||||
provideCallHierarchyIncomingCalls(item: CallHierarchyItem, token: CancellationToken): ProviderResult<CallHierarchyIncomingCall[]>;
|
||||
|
||||
/**
|
||||
* Provide all outgoing calls for an item, e.g call calls to functions, methods, or constructors from the given item. In
|
||||
* graph terms this describes directed and annotated edges inside the call graph, e.g the given item is the starting
|
||||
* node and the result is the nodes that can be reached.
|
||||
*
|
||||
* @param item The hierarchy item for which outgoing calls should be computed.
|
||||
* @param token A cancellation token.
|
||||
* @returns A set of outgoing calls or a thenable that resolves to such. The lack of a result can be
|
||||
* signaled by returning `undefined` or `null`.
|
||||
*/
|
||||
provideCallHierarchyOutgoingCalls(item: CallHierarchyItem, token: CancellationToken): ProviderResult<CallHierarchyOutgoingCall[]>;
|
||||
}
|
||||
|
||||
/**
|
||||
* A tuple of two characters, like a pair of
|
||||
* opening and closing brackets.
|
||||
@@ -4080,11 +4238,11 @@ declare module 'vscode' {
|
||||
* - Workspace configuration (if available)
|
||||
* - Workspace folder configuration of the requested resource (if available)
|
||||
*
|
||||
* *Global configuration* comes from User Settings and shadows Defaults.
|
||||
* *Global configuration* comes from User Settings and overrides Defaults.
|
||||
*
|
||||
* *Workspace configuration* comes from Workspace Settings and shadows Global configuration.
|
||||
* *Workspace configuration* comes from Workspace Settings and overrides Global configuration.
|
||||
*
|
||||
* *Workspace Folder configuration* comes from `.vscode` folder under one of the [workspace folders](#workspace.workspaceFolders).
|
||||
* *Workspace Folder configuration* comes from `.vscode` folder under one of the [workspace folders](#workspace.workspaceFolders) and overrides Workspace configuration.
|
||||
*
|
||||
* *Note:* Workspace and Workspace Folder configurations contains `launch` and `tasks` settings. Their basename will be
|
||||
* part of the section identifier. The following snippets shows how to retrieve all configurations
|
||||
@@ -4133,9 +4291,9 @@ declare module 'vscode' {
|
||||
* a workspace-specific value and a folder-specific value.
|
||||
*
|
||||
* The *effective* value (returned by [`get`](#WorkspaceConfiguration.get))
|
||||
* is computed like this: `defaultValue` overwritten by `globalValue`,
|
||||
* `globalValue` overwritten by `workspaceValue`. `workspaceValue` overwritten by `workspaceFolderValue`.
|
||||
* Refer to [Settings Inheritance](https://code.visualstudio.com/docs/getstarted/settings)
|
||||
* is computed like this: `defaultValue` overridden by `globalValue`,
|
||||
* `globalValue` overridden by `workspaceValue`. `workspaceValue` overwridden by `workspaceFolderValue`.
|
||||
* Refer to [Settings](https://code.visualstudio.com/docs/getstarted/settings)
|
||||
* for more information.
|
||||
*
|
||||
* *Note:* The configuration name must denote a leaf in the configuration tree
|
||||
@@ -4624,7 +4782,7 @@ declare module 'vscode' {
|
||||
*
|
||||
* `My text $(icon-name) contains icons like $(icon-name) this one.`
|
||||
*
|
||||
* Where the icon-name is taken from the [octicon](https://octicons.github.com) icon set, e.g.
|
||||
* Where the icon-name is taken from the [codicon](https://microsoft.github.io/vscode-codicons/dist/codicon.html) icon set, e.g.
|
||||
* `light-bulb`, `thumbsup`, `zap` etc.
|
||||
*/
|
||||
text: string;
|
||||
@@ -4688,7 +4846,7 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The process ID of the shell process.
|
||||
*/
|
||||
readonly processId: Thenable<number>;
|
||||
readonly processId: Thenable<number | undefined>;
|
||||
|
||||
/**
|
||||
* Send text to the terminal. The text is written to the stdin of the underlying pty process
|
||||
@@ -4766,8 +4924,8 @@ declare module 'vscode' {
|
||||
/**
|
||||
* The extension kind describes if an extension runs where the UI runs
|
||||
* or if an extension runs where the remote extension host runs. The extension kind
|
||||
* if defined in the `package.json` file of extensions but can also be refined
|
||||
* via the the `remote.extensionKind`-setting. When no remote extension host exists,
|
||||
* is defined in the `package.json`-file of extensions but can also be refined
|
||||
* via the `remote.extensionKind`-setting. When no remote extension host exists,
|
||||
* the value is [`ExtensionKind.UI`](#ExtensionKind.UI).
|
||||
*/
|
||||
extensionKind: ExtensionKind;
|
||||
@@ -5589,10 +5747,18 @@ declare module 'vscode' {
|
||||
ctime: number;
|
||||
/**
|
||||
* The modification timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC.
|
||||
*
|
||||
* *Note:* If the file changed, it is important to provide an updated `mtime` that advanced
|
||||
* from the previous value. Otherwise there may be optimizations in place that will not show
|
||||
* the updated file contents in an editor for example.
|
||||
*/
|
||||
mtime: number;
|
||||
/**
|
||||
* The size in bytes.
|
||||
*
|
||||
* *Note:* If the file changed, it is important to provide an updated `size`. Otherwise there
|
||||
* may be optimizations in place that will not show the updated file contents in an editor for
|
||||
* example.
|
||||
*/
|
||||
size: number;
|
||||
}
|
||||
@@ -5706,6 +5872,11 @@ declare module 'vscode' {
|
||||
* An event to signal that a resource has been created, changed, or deleted. This
|
||||
* event should fire for resources that are being [watched](#FileSystemProvider.watch)
|
||||
* by clients of this provider.
|
||||
*
|
||||
* *Note:* It is important that the metadata of the file that changed provides an
|
||||
* updated `mtime` that advanced from the previous value in the [stat](#FileStat) and a
|
||||
* correct `size` value. Otherwise there may be optimizations in place that will not show
|
||||
* the change in an editor for example.
|
||||
*/
|
||||
readonly onDidChangeFile: Event<FileChangeEvent[]>;
|
||||
|
||||
@@ -5843,6 +6014,9 @@ declare module 'vscode' {
|
||||
/**
|
||||
* Create a new directory (Note, that new files are created via `write`-calls).
|
||||
*
|
||||
* *Note* that missing directories are created automatically, e.g this call has
|
||||
* `mkdirp` semantics.
|
||||
*
|
||||
* @param uri The uri of the new folder.
|
||||
*/
|
||||
createDirectory(uri: Uri): Thenable<void>;
|
||||
@@ -6290,22 +6464,51 @@ declare module 'vscode' {
|
||||
export function openExternal(target: Uri): Thenable<boolean>;
|
||||
|
||||
/**
|
||||
* Resolves a uri to form that is accessible externally. Currently only supports `https:`, `http:` and
|
||||
* `vscode.env.uriScheme` uris.
|
||||
*
|
||||
* #### `http:` or `https:` scheme
|
||||
*
|
||||
* Resolves an *external* uri, such as a `http:` or `https:` link, from where the extension is running to a
|
||||
* uri to the same resource on the client machine.
|
||||
*
|
||||
* This is a no-op if the extension is running on the client machine. Currently only supports
|
||||
* `https:` and `http:` uris.
|
||||
* This is a no-op if the extension is running on the client machine.
|
||||
*
|
||||
* If the extension is running remotely, this function automatically establishes a port forwarding tunnel
|
||||
* from the local machine to `target` on the remote and returns a local uri to the tunnel. The lifetime of
|
||||
* the port fowarding tunnel is managed by VS Code and the tunnel can be closed by the user.
|
||||
*
|
||||
* Extensions should not cache the result of `asExternalUri` as the resolved uri may become invalid due to
|
||||
* a system or user action — for example, in remote cases, a user may close a port forwardng tunnel
|
||||
* that was opened by `asExternalUri`.
|
||||
* *Note* that uris passed through `openExternal` are automatically resolved and you should not call `asExternalUri` on them.
|
||||
*
|
||||
* *Note* that uris passed through `openExternal` are automatically resolved and you should not call `asExternalUri`
|
||||
* on them.
|
||||
* #### `vscode.env.uriScheme`
|
||||
*
|
||||
* Creates a uri that - if opened in a browser (e.g. via `openExternal`) - will result in a registered [UriHandler](#UriHandler)
|
||||
* to trigger.
|
||||
*
|
||||
* Extensions should not make any assumptions about the resulting uri and should not alter it in anyway.
|
||||
* Rather, extensions can e.g. use this uri in an authentication flow, by adding the uri as callback query
|
||||
* argument to the server to authenticate to.
|
||||
*
|
||||
* *Note* that if the server decides to add additional query parameters to the uri (e.g. a token or secret), it
|
||||
* will appear in the uri that is passed to the [UriHandler](#UriHandler).
|
||||
*
|
||||
* **Example** of an authentication flow:
|
||||
* ```typescript
|
||||
* vscode.window.registerUriHandler({
|
||||
* handleUri(uri: vscode.Uri): vscode.ProviderResult<void> {
|
||||
* if (uri.path === '/did-authenticate') {
|
||||
* console.log(uri.toString());
|
||||
* }
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* const callableUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://my.extension/did-authenticate`));
|
||||
* await vscode.env.openExternal(callableUri);
|
||||
* ```
|
||||
*
|
||||
* *Note* that extensions should not cache the result of `asExternalUri` as the resolved uri may become invalid due to
|
||||
* a system or user action — for example, in remote cases, a user may close a port forwarding tunnel that was opened by
|
||||
* `asExternalUri`.
|
||||
*
|
||||
* @return A uri that can be used on the client machine.
|
||||
*/
|
||||
@@ -7084,6 +7287,12 @@ declare module 'vscode' {
|
||||
*/
|
||||
message?: string;
|
||||
|
||||
/**
|
||||
* The tree view title is initially taken from the extension package.json
|
||||
* Changes to the title property will be properly reflected in the UI in the title of the view.
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* Reveals the given element in the tree view.
|
||||
* If the tree view is not visible then the tree view is shown and element is revealed.
|
||||
@@ -7312,6 +7521,9 @@ declare module 'vscode' {
|
||||
* [Terminal.sendText](#Terminal.sendText) which sends text to the underlying _process_
|
||||
* (the pty "slave"), this will write the text to the terminal itself (the pty "master").
|
||||
*
|
||||
* Note writing `\n` will just move the cursor down 1 row, you need to write `\r` as well
|
||||
* to move the cursor to the left-most cell.
|
||||
*
|
||||
* **Example:** Write red text to the terminal
|
||||
* ```typescript
|
||||
* const writeEmitter = new vscode.EventEmitter<string>();
|
||||
@@ -8103,8 +8315,8 @@ declare module 'vscode' {
|
||||
*
|
||||
* All changes of a workspace edit are applied in the same order in which they have been added. If
|
||||
* multiple textual inserts are made at the same position, these strings appear in the resulting text
|
||||
* in the order the 'inserts' were made. Invalid sequences like 'delete file a' -> 'insert text in file a'
|
||||
* cause failure of the operation.
|
||||
* in the order the 'inserts' were made, unless that are interleaved with resource edits. Invalid sequences
|
||||
* like 'delete file a' -> 'insert text in file a' cause failure of the operation.
|
||||
*
|
||||
* When applying a workspace edit that consists only of text edits an 'all-or-nothing'-strategy is used.
|
||||
* A workspace edit with resource creations or deletions aborts the operation, e.g. consecutive edits will
|
||||
@@ -8693,6 +8905,15 @@ declare module 'vscode' {
|
||||
*/
|
||||
export function registerSelectionRangeProvider(selector: DocumentSelector, provider: SelectionRangeProvider): Disposable;
|
||||
|
||||
/**
|
||||
* Register a call hierarchy provider.
|
||||
*
|
||||
* @param selector A selector that defines the documents this provider is applicable to.
|
||||
* @param provider A call hierarchy provider.
|
||||
* @return A [disposable](#Disposable) that unregisters this provider when being disposed.
|
||||
*/
|
||||
export function registerCallHierarchyProvider(selector: DocumentSelector, provider: CallHierarchyProvider): Disposable;
|
||||
|
||||
/**
|
||||
* Set a [language configuration](#LanguageConfiguration) for a language.
|
||||
*
|
||||
@@ -9282,6 +9503,48 @@ declare module 'vscode' {
|
||||
constructor(functionName: string, enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Debug console mode used by debug session, see [options](#DebugSessionOptions).
|
||||
*/
|
||||
export enum DebugConsoleMode {
|
||||
/**
|
||||
* Debug session should have a separate debug console.
|
||||
*/
|
||||
Separate = 0,
|
||||
|
||||
/**
|
||||
* Debug session should share debug console with its parent session.
|
||||
* This value has no effect for sessions which do not have a parent session.
|
||||
*/
|
||||
MergeWithParent = 1
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for [starting a debug session](#debug.startDebugging).
|
||||
*/
|
||||
export interface DebugSessionOptions {
|
||||
|
||||
/**
|
||||
* When specified the newly created debug session is registered as a "child" session of this
|
||||
* "parent" debug session.
|
||||
*/
|
||||
parentSession?: DebugSession;
|
||||
|
||||
/**
|
||||
* Controls whether this session should have a separate debug console or share it
|
||||
* with the parent session. Has no effect for sessions which do not have a parent session.
|
||||
* Defaults to Separate.
|
||||
*/
|
||||
consoleMode?: DebugConsoleMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* A DebugProtocolSource is an opaque stand-in type for the [Source](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Source) type defined in the Debug Adapter Protocol.
|
||||
*/
|
||||
export interface DebugProtocolSource {
|
||||
// Properties: see details [here](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Source).
|
||||
}
|
||||
|
||||
/**
|
||||
* Namespace for debug functionality.
|
||||
*/
|
||||
@@ -9388,6 +9651,19 @@ declare module 'vscode' {
|
||||
* @param breakpoints The breakpoints to remove.
|
||||
*/
|
||||
export function removeBreakpoints(breakpoints: Breakpoint[]): void;
|
||||
|
||||
/**
|
||||
* Converts a "Source" descriptor object received via the Debug Adapter Protocol into a Uri that can be used to load its contents.
|
||||
* If the source descriptor is based on a path, a file Uri is returned.
|
||||
* If the source descriptor uses a reference number, a specific debug Uri (scheme 'debug') is constructed that requires a corresponding VS Code ContentProvider and a running debug session
|
||||
*
|
||||
* If the "Source" descriptor has insufficient information for creating the Uri, an error is thrown.
|
||||
*
|
||||
* @param source An object conforming to the [Source](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Source) type defined in the Debug Adapter Protocol.
|
||||
* @param session An optional debug session that will be used when the source descriptor uses a reference number to load the contents from an active debug session.
|
||||
* @return A uri that can be used to load the contents of the source.
|
||||
*/
|
||||
export function asDebugSourceUri(source: DebugProtocolSource, session?: DebugSession): Uri;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user