mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
QuickInput Proposed API (#49340)
This commit is contained in:
@@ -26,7 +26,7 @@ import * as modes from 'vs/editor/common/modes';
|
||||
import { IConfigurationData, ConfigurationTarget, IConfigurationModel } from 'vs/platform/configuration/common/configuration';
|
||||
import { IConfig, IAdapterExecutable, ITerminalSettings } from 'vs/workbench/parts/debug/common/debug';
|
||||
|
||||
import { IPickOpenEntry, IPickOptions } from 'vs/platform/quickinput/common/quickInput';
|
||||
import { IQuickPickItem, IPickOptions } from 'vs/platform/quickinput/common/quickInput';
|
||||
import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { TextEditorCursorStyle } from 'vs/editor/common/config/editorOptions';
|
||||
import { EndOfLine, TextEditorLineNumbersStyle } from 'vs/workbench/api/node/extHostTypes';
|
||||
@@ -336,15 +336,75 @@ export interface MainThreadTerminalServiceShape extends IDisposable {
|
||||
$sendProcessExit(terminalId: number, exitCode: number): void;
|
||||
}
|
||||
|
||||
export interface MyQuickPickItems extends IPickOpenEntry {
|
||||
export interface MyQuickPickItems extends IQuickPickItem {
|
||||
handle: number;
|
||||
}
|
||||
|
||||
export type TransferQuickInput = TransferQuickPick | TransferInputBox;
|
||||
|
||||
export interface BaseTransferQuickInput {
|
||||
|
||||
id: number;
|
||||
|
||||
type?: 'quickPick' | 'inputBox';
|
||||
|
||||
enabled?: boolean;
|
||||
|
||||
busy?: boolean;
|
||||
|
||||
visible?: boolean;
|
||||
}
|
||||
|
||||
export interface TransferQuickPick extends BaseTransferQuickInput {
|
||||
|
||||
type?: 'quickPick';
|
||||
|
||||
value?: string;
|
||||
|
||||
placeholder?: string;
|
||||
|
||||
commands?: TransferQuickInputCommand[];
|
||||
|
||||
items?: MyQuickPickItems[];
|
||||
|
||||
canSelectMany?: boolean;
|
||||
|
||||
ignoreFocusOut?: boolean;
|
||||
|
||||
matchOnDescription?: boolean;
|
||||
|
||||
matchOnDetail?: boolean;
|
||||
}
|
||||
|
||||
export interface TransferInputBox extends BaseTransferQuickInput {
|
||||
|
||||
type?: 'inputBox';
|
||||
|
||||
value?: string;
|
||||
|
||||
placeholder?: string;
|
||||
|
||||
password?: boolean;
|
||||
|
||||
commands?: TransferQuickInputCommand[];
|
||||
|
||||
prompt?: string;
|
||||
|
||||
validationMessage?: string;
|
||||
}
|
||||
|
||||
export interface TransferQuickInputCommand {
|
||||
iconPath: { light: string; dark: string; };
|
||||
tooltip?: string | undefined;
|
||||
}
|
||||
|
||||
export interface MainThreadQuickOpenShape extends IDisposable {
|
||||
$show(multiStepHandle: number | undefined, options: IPickOptions): TPromise<number | number[]>;
|
||||
$show(options: IPickOptions): TPromise<number | number[]>;
|
||||
$setItems(items: MyQuickPickItems[]): TPromise<any>;
|
||||
$setError(error: Error): TPromise<any>;
|
||||
$input(multiStepHandle: number | undefined, options: vscode.InputBoxOptions, validateInput: boolean): TPromise<string>;
|
||||
$multiStep(handle: number): TPromise<never>;
|
||||
$input(options: vscode.InputBoxOptions, validateInput: boolean): TPromise<string>;
|
||||
$createOrUpdate(params: TransferQuickInput): TPromise<void>;
|
||||
$dispose(id: number): TPromise<void>;
|
||||
}
|
||||
|
||||
export interface MainThreadStatusBarShape extends IDisposable {
|
||||
@@ -756,6 +816,9 @@ export interface ExtHostLanguageFeaturesShape {
|
||||
export interface ExtHostQuickOpenShape {
|
||||
$onItemSelected(handle: number): void;
|
||||
$validateInput(input: string): TPromise<string>;
|
||||
$onDidChangeActive(sessionId: number, handles: number[]): void;
|
||||
$onDidChangeSelection(sessionId: number, handles: number[]): void;
|
||||
$onDidAccept(sessionId: number): void;
|
||||
}
|
||||
|
||||
export interface ShellLaunchConfigDto {
|
||||
|
||||
Reference in New Issue
Block a user