Skip to main content

Interface: IDE

libs/common/ide/types/ide.types.IDE

Implemented by

Properties

activeEditableTextEditor

Readonly activeEditableTextEditor: undefined | EditableTextEditor

Same as activeTextEditor but editable

Defined in

libs/common/ide/types/ide.types.ts:56


activeTextEditor

Readonly activeTextEditor: undefined | TextEditor

The currently active editor or undefined. The active editor is the one that currently has focus or, when none has focus, the one that has changed input most recently.

Defined in

libs/common/ide/types/ide.types.ts:51


assetsRoot

Readonly assetsRoot: string

The root directory of this shipped code. Can be used to access bundled assets.

Defined in

libs/common/ide/types/ide.types.ts:34


capabilities

Readonly capabilities: Capabilities

The capabilities of the IDE

Defined in

libs/common/ide/types/ide.types.ts:66


clipboard

Readonly clipboard: Clipboard

Defined in

libs/common/ide/types/ide.types.ts:20


configuration

Readonly configuration: Configuration

Defined in

libs/common/ide/types/ide.types.ts:17


globalState

Readonly globalState: State

Defined in

libs/common/ide/types/ide.types.ts:19


messages

Readonly messages: Messages

Defined in

libs/common/ide/types/ide.types.ts:18


runMode

Readonly runMode: RunMode

Whether we are running in development, test, or production

Defined in

libs/common/ide/types/ide.types.ts:39


visibleTextEditors

Readonly visibleTextEditors: TextEditor[]

The currently visible editors or an empty array.

Defined in

libs/common/ide/types/ide.types.ts:61


workspaceFolders

Readonly workspaceFolders: undefined | readonly WorkspaceFolder[]

A list of workspace folders for the currently active workspace

Defined in

libs/common/ide/types/ide.types.ts:44

Methods

disposeOnExit

disposeOnExit(...disposables): () => void

Register disposables to be disposed of on IDE exit.

Parameters

NameTypeDescription
...disposablesDisposable[]A list of Disposables to dispose when the IDE is exited.

Returns

fn

A function that can be called to deregister the disposables

▸ (): void

Register disposables to be disposed of on IDE exit.

Returns

void

A function that can be called to deregister the disposables

Defined in

libs/common/ide/types/ide.types.ts:28


executeCommand

executeCommand<T>(command, ...args): Promise<undefined | T>

Executes the built-in ide command denoted by the given command identifier.

Type parameters

Name
T

Parameters

NameTypeDescription
commandstringIdentifier of the command to execute.
...argsany[]Parameters passed to the command function.

Returns

Promise<undefined | T>

A promise that resolves to the returned value of the given command. undefined when the command handler function doesn't return anything.

Defined in

libs/common/ide/types/ide.types.ts:118


findInWorkspace

findInWorkspace(query): Promise<void>

Find occurrences of query string in all files in the workspace

Parameters

NameTypeDescription
querystringThe string query to search for

Returns

Promise<void>

Defined in

libs/common/ide/types/ide.types.ts:87


getEditableTextEditor

getEditableTextEditor(editor): EditableTextEditor

Get an editable version of the text editor.

Parameters

NameTypeDescription
editorTextEditorA editable text editor

Returns

EditableTextEditor

Defined in

libs/common/ide/types/ide.types.ts:72


onDidChangeTextDocument

onDidChangeTextDocument(listener): Disposable

An event that is emitted when a text document is changed. This usually happens when the contents changes but also when other things like the {@link TextDocument.isDirty dirty}-state changes.

Parameters

NameType
listener(event: TextDocumentChangeEvent) => void

Returns

Disposable

Defined in

libs/common/ide/types/ide.types.ts:79


openTextDocument

openTextDocument(path): Promise<TextEditor>

Opens a document.

see openTextDocument

Parameters

NameTypeDescription
pathstringA path to a file on disk.

Returns

Promise<TextEditor>

An editor for the text document at the given path

Defined in

libs/common/ide/types/ide.types.ts:96


showInputBox

showInputBox(options?): Promise<undefined | string>

Opens an input box to ask the user for input.

The returned value will be undefined if the input box was canceled (e.g. pressing ESC). Otherwise the returned value will be the string typed by the user or an empty string if the user did not type anything but dismissed the input box with OK.

Parameters

NameTypeDescription
options?InputBoxOptionsConfigures the behavior of the input box.

Returns

Promise<undefined | string>

A promise that resolves to a string the user provided or to undefined in case of dismissal.

Defined in

libs/common/ide/types/ide.types.ts:108