Class: VscodeIDE
ide/vscode/VscodeIDE.VscodeIDE
Implements
Constructors
constructor
• new VscodeIDE(extensionContext)
Parameters
| Name | Type |
|---|---|
extensionContext | ExtensionContext |
Defined in
ide/vscode/VscodeIDE.ts:33
Properties
capabilities
• Readonly capabilities: VscodeCapabilities
The capabilities of the IDE
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:30
clipboard
• Readonly clipboard: VscodeClipboard
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:29
configuration
• Readonly configuration: VscodeConfiguration
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:26
editorMap
• Private editorMap: WeakMap<TextEditor, VscodeTextEditorImpl>
Defined in
ide/vscode/VscodeIDE.ts:31
globalState
• Readonly globalState: VscodeGlobalState
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:27
messages
• Readonly messages: VscodeMessages
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:28
Accessors
activeEditableTextEditor
• get activeEditableTextEditor(): undefined | EditableTextEditor
Same as activeTextEditor but editable
Returns
undefined | EditableTextEditor
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:58
activeTextEditor
• get 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.
Returns
undefined | TextEditor
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:54
assetsRoot
• get assetsRoot(): string
The root directory of this shipped code. Can be used to access bundled assets.
Returns
string
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:42
runMode
• get runMode(): RunMode
Whether we are running in development, test, or production
Returns
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:46
visibleTextEditors
• get visibleTextEditors(): TextEditor[]
The currently visible editors or an empty array.
Returns
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:68
workspaceFolders
• get workspaceFolders(): undefined | readonly WorkspaceFolder[]
A list of workspace folders for the currently active workspace
Returns
undefined | readonly WorkspaceFolder[]
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:50
Methods
disposeOnExit
▸ disposeOnExit(...disposables): () => void
Register disposables to be disposed of on IDE exit.
Parameters
| Name | Type |
|---|---|
...disposables | Disposable[] |
Returns
fn
▸ (): void
Returns
void
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:116
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
| Name | Type |
|---|---|
command | string |
...args | any[] |
Returns
Promise<undefined | T>
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:93
findInWorkspace
▸ findInWorkspace(query): Promise<void>
Find occurrences of query string in all files in the workspace
Parameters
| Name | Type |
|---|---|
query | string |
Returns
Promise<void>
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:76
fromVscodeEditor
▸ fromVscodeEditor(editor): VscodeTextEditorImpl
Parameters
| Name | Type |
|---|---|
editor | TextEditor |
Returns
Defined in
ide/vscode/VscodeIDE.ts:106
getActiveTextEditor
▸ Private getActiveTextEditor(): undefined | VscodeTextEditorImpl
Returns
undefined | VscodeTextEditorImpl
Defined in
ide/vscode/VscodeIDE.ts:62
getEditableTextEditor
▸ getEditableTextEditor(editor): EditableTextEditor
Get an editable version of the text editor.
Parameters
| Name | Type |
|---|---|
editor | TextEditor |
Returns
Implementation of
Defined in
ide/vscode/VscodeIDE.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
| Name | Type |
|---|---|
listener | (event: TextDocumentChangeEvent) => void |
Returns
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:100
openTextDocument
▸ openTextDocument(path): Promise<TextEditor>
Opens a document.
Parameters
| Name | Type |
|---|---|
path | string |
Returns
Promise<TextEditor>
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:82
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
| Name | Type |
|---|---|
options? | InputBoxOptions |
Returns
Promise<undefined | string>
Implementation of
Defined in
ide/vscode/VscodeIDE.ts:87