Represents the grid widget within the main editor area
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.
The currently visible editors or an empty array.
The currently visible notebook editors or an empty array.
The currently active notebook 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.
The currently opened terminals or an empty array.
The currently active terminal or undefined
. The active terminal is the one that
currently has focus or most recently had focus.
Represents the current window's state.
The currently active color theme as configured in the settings. The active
theme can be changed via the workbench.colorTheme
setting.
An Event which fires when the active editor
has changed. Note that the event also fires when the active editor changes
to undefined
.
An Event which fires when the array of visible editors has changed.
An Event which fires when the selection in an editor has changed.
An Event which fires when the visible ranges of an editor has changed.
An Event which fires when the options of an editor have changed.
An Event which fires when the view column of an editor has changed.
An Event which fires when the visible notebook editors has changed.
An Event which fires when the active notebook editor
has changed. Note that the event also fires when the active editor changes
to undefined
.
An Event which fires when the notebook editor selections have changed.
An Event which fires when the notebook editor visible ranges have changed.
An Event which fires when the active terminal
has changed. Note that the event also fires when the active terminal changes
to undefined
.
An Event which fires when a terminal has been created, either through the createTerminal API or commands.
An Event which fires when a terminal is disposed.
An Event which fires when a terminal's state has changed.
An Event which fires when the focus state of the current window changes. The value of the event represents whether the window is focused.
Show the given document in a text editor. A column can be provided to control where the editor is being shown. Might change the active editor.
A text document to be shown.
A view column in which the editor should be shown. The default is the active.
Columns that do not exist will be created as needed up to the maximum of ViewColumn.Nine
. Use ViewColumn.Beside
to open the editor to the side of the currently active one.
When true
the editor will not take focus.
A promise that resolves to an editor.
Show the given document in a text editor. Options can be provided to control options of the editor is being shown. Might change the active editor.
A text document to be shown.
Editor options to configure the behavior of showing the editor.
A promise that resolves to an editor.
A short-hand for openTextDocument(uri).then(document => showTextDocument(document, options))
.
A resource identifier.
Editor options to configure the behavior of showing the editor.
A promise that resolves to an editor.
Show the given NotebookDocument in a notebook editor.
A text document to be shown.
Editor options to configure the behavior of showing the notebook editor.
A promise that resolves to an notebook editor.
Create a TextEditorDecorationType that can be used to add decorations to text editors.
Rendering options for the decoration type.
A new decoration type instance.
Show an information message to users. Optionally provide an array of items which will be presented as clickable buttons.
The message to show.
A set of items that will be rendered as actions in the message.
A thenable that resolves to the selected item or undefined
when being dismissed.
Show an information message to users. Optionally provide an array of items which will be presented as clickable buttons.
The message to show.
Configures the behaviour of the message.
A set of items that will be rendered as actions in the message.
A thenable that resolves to the selected item or undefined
when being dismissed.
Show an information message.
The message to show.
A set of items that will be rendered as actions in the message.
A thenable that resolves to the selected item or undefined
when being dismissed.
Show an information message.
The message to show.
Configures the behaviour of the message.
A set of items that will be rendered as actions in the message.
A thenable that resolves to the selected item or undefined
when being dismissed.
Show a warning message.
The message to show.
A set of items that will be rendered as actions in the message.
A thenable that resolves to the selected item or undefined
when being dismissed.
Show a warning message.
The message to show.
Configures the behaviour of the message.
A set of items that will be rendered as actions in the message.
A thenable that resolves to the selected item or undefined
when being dismissed.
Show a warning message.
The message to show.
A set of items that will be rendered as actions in the message.
A thenable that resolves to the selected item or undefined
when being dismissed.
Show a warning message.
The message to show.
Configures the behaviour of the message.
A set of items that will be rendered as actions in the message.
A thenable that resolves to the selected item or undefined
when being dismissed.
Show an error message.
The message to show.
A set of items that will be rendered as actions in the message.
A thenable that resolves to the selected item or undefined
when being dismissed.
Show an error message.
The message to show.
Configures the behaviour of the message.
A set of items that will be rendered as actions in the message.
A thenable that resolves to the selected item or undefined
when being dismissed.
Show an error message.
The message to show.
A set of items that will be rendered as actions in the message.
A thenable that resolves to the selected item or undefined
when being dismissed.
Show an error message.
The message to show.
Configures the behaviour of the message.
A set of items that will be rendered as actions in the message.
A thenable that resolves to the selected item or undefined
when being dismissed.
Shows a selection list allowing multiple selections.
An array of strings, or a promise that resolves to an array of strings.
Configures the behavior of the selection list.
A token that can be used to signal cancellation.
A promise that resolves to the selected items or undefined
.
Shows a selection list.
An array of strings, or a promise that resolves to an array of strings.
Configures the behavior of the selection list.
A token that can be used to signal cancellation.
A promise that resolves to the selection or undefined
.
Shows a selection list allowing multiple selections.
An array of items, or a promise that resolves to an array of items.
Configures the behavior of the selection list.
A token that can be used to signal cancellation.
A promise that resolves to the selected items or undefined
.
Shows a selection list.
An array of items, or a promise that resolves to an array of items.
Configures the behavior of the selection list.
A token that can be used to signal cancellation.
A promise that resolves to the selected item or undefined
.
Shows a selection list of workspace folders to pick from.
Returns undefined
if no folder is open.
Configures the behavior of the workspace folder list.
A promise that resolves to the workspace folder or undefined
.
Shows a file open dialog to the user which allows to select a file for opening-purposes.
Options that control the dialog.
A promise that resolves to the selected resources or undefined
.
Shows a file save dialog to the user which allows to select a file for saving-purposes.
Options that control the dialog.
A promise that resolves to the selected resource or undefined
.
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.
Configures the behavior of the input box.
A token that can be used to signal cancellation.
A promise that resolves to a string the user provided or to undefined
in case of dismissal.
Creates a QuickPick to let the user pick an item from a list of items of type T.
Note that in many cases the more convenient window.showQuickPick is easier to use. window.createQuickPick should be used when window.showQuickPick does not offer the required flexibility.
A new QuickPick.
Creates a InputBox to let the user enter some text input.
Note that in many cases the more convenient window.showInputBox is easier to use. window.createInputBox should be used when window.showInputBox does not offer the required flexibility.
A new InputBox.
Creates a new output channel with the given name and language id If language id is not provided, then Log is used as default language id.
You can access the visible or active output channel as a text document from visible editors or active editor and use the language id to contribute language features like syntax coloring, code lens etc.,
Human-readable string which will be used to represent the channel in the UI.
The identifier of the language associated with the channel.
A new output channel.
Creates a new log output channel with the given name.
Human-readable string which will be used to represent the channel in the UI.
Options for the log output channel.
A new log output channel.
Create and show a new webview panel.
Identifies the type of the webview panel.
Title of the panel.
Where to show the webview in the editor. If preserveFocus is set, the new webview will not take focus.
Settings for the new panel.
New webview panel.
Set a message to the status bar. This is a short hand for the more powerful status bar items.
The message to show, supports icon substitution as in status bar items.
Timeout in milliseconds after which the message will be disposed.
A disposable which hides the status bar message.
Set a message to the status bar. This is a short hand for the more powerful status bar items.
The message to show, supports icon substitution as in status bar items.
Thenable on which completion (resolve or reject) the message will be disposed.
A disposable which hides the status bar message.
Set a message to the status bar. This is a short hand for the more powerful status bar items.
Note that status bar messages stack and that they must be disposed when no longer used.
The message to show, supports icon substitution as in status bar items.
A disposable which hides the status bar message.
Show progress in the Source Control viewlet while running the given callback and while its returned promise isn't resolve or rejected.
A callback returning a promise. Progress increments can be reported with the provided Progress-object.
The thenable the task did return.
Show progress in the editor. Progress is shown while running the given callback
and while the promise it returned isn't resolved nor rejected. The location at which
progress should show (and other details) is defined via the passed ProgressOptions
.
A ProgressOptions
-object describing the options to use for showing progress, like its location
A callback returning a promise. Progress state can be reported with the provided Progress-object.
To report discrete progress, use increment
to indicate how much work has been completed. Each call with
a increment
value will be summed up and reflected as overall progress until 100% is reached (a value of
e.g. 10
accounts for 10%
of work done).
Note that currently only ProgressLocation.Notification
is capable of showing discrete progress.
To monitor if the operation has been cancelled by the user, use the provided CancellationToken
.
Note that currently only ProgressLocation.Notification
is supporting to show a cancel button to cancel the
long running operation.
The thenable the task-callback returned.
Creates a status bar item.
The identifier of the item. Must be unique within the extension.
The alignment of the item.
The priority of the item. Higher values mean the item should be shown more to the left.
A new status bar item.
Creates a status bar item.
The alignment of the item.
The priority of the item. Higher values mean the item should be shown more to the left.
A new status bar item.
Creates a Terminal with a backing shell process. The cwd of the terminal will be the workspace directory if it exists.
Optional human-readable string which will be used to represent the terminal in the UI.
Optional path to a custom shell executable to be used in the terminal.
Optional args for the custom shell executable. A string can be used on Windows only which allows specifying shell args in command-line format.
A new Terminal.
Creates a Terminal with a backing shell process.
A TerminalOptions object describing the characteristics of the new terminal.
A new Terminal.
Creates a Terminal where an extension controls its input and output.
An ExtensionTerminalOptions object describing the characteristics of the new terminal.
A new Terminal.
Register a TreeDataProvider for the view contributed using the extension point views
.
This will allow you to contribute data to the TreeView and update if the data changes.
Note: To get access to the TreeView and perform operations on it, use createTreeView.
Id of the view contributed using the extension point views
.
A TreeDataProvider that provides tree data for the view
A disposable that unregisters the TreeDataProvider.
Create a TreeView for the view contributed using the extension point views
.
Id of the view contributed using the extension point views
.
Options for creating the TreeView
a TreeView.
Registers a uri handler capable of handling system-wide uris. In case there are multiple windows open, the topmost window will handle the uri. A uri handler is scoped to the extension it is contributed from; it will only be able to handle uris which are directed to the extension itself. A uri must respect the following rules:
vscode.env.uriScheme
;my.extension
);For example, if the my.extension
extension registers a uri handler, it will only
be allowed to handle uris with the prefix product-name://my.extension
.
An extension can only register a single uri handler in its entire activation lifetime.
onUri
that fires when a uri directed for
the current extension is about to be handled.The uri handler to register for this extension.
A disposable that unregisters the handler.
Registers a webview panel serializer.
Extensions that support reviving should have an "onWebviewPanel:viewType"
activation event and
make sure that registerWebviewPanelSerializer
is called during activation.
Only a single serializer may be registered at a time for a given viewType
.
Type of the webview panel that can be serialized.
Webview serializer.
A disposable that unregisters the serializer.
Register a new provider for webview views.
Unique id of the view. This should match the id
from the
views
contribution in the package.json.
Provider for the webview views.
Content settings for the webview created for this view.
Controls if the webview element itself (iframe) is kept around even when the view is no longer visible.
Normally the webview's html context is created when the view becomes visible
and destroyed when it is hidden. Extensions that have complex state
or UI can set the retainContextWhenHidden
to make the editor keep the webview
context around, even when the webview moves to a background tab. When a webview using
retainContextWhenHidden
becomes hidden, its scripts and other dynamic content are suspended.
When the view becomes visible again, the context is automatically restored
in the exact same state it was in originally. You cannot send messages to a
hidden webview, even with retainContextWhenHidden
enabled.
retainContextWhenHidden
has a high memory overhead and should only be used if
your view's context cannot be quickly saved and restored.
Disposable that unregisters the provider.
Register a provider for custom editors for the viewType
contributed by the customEditors
extension point.
When a custom editor is opened, an onCustomEditor:viewType
activation event is fired. Your extension
must register a CustomTextEditorProvider
, CustomReadonlyEditorProvider
,
CustomEditorProvider
for viewType
as part of activation.
Unique identifier for the custom editor provider. This should match the viewType
from the
customEditors
contribution point.
Provider that resolves custom editors.
Options for the provider.
Content settings for the webview panels created for this custom editor.
Only applies to CustomReadonlyEditorProvider | CustomEditorProvider
.
Indicates that the provider allows multiple editor instances to be open at the same time for the same resource.
By default, the editor only allows one editor instance to be open at a time for each resource. If the user tries to open a second editor instance for the resource, the first one is instead moved to where the second one was to be opened.
When supportsMultipleEditorsPerDocument
is enabled, users can split and create copies of the custom
editor. In this case, the custom editor must make sure it can properly synchronize the states of all
editor instances for a resource so that they are consistent.
Disposable that unregisters the provider.
Register provider that enables the detection and handling of links within the terminal.
The provider that provides the terminal links.
Disposable that unregisters the provider.
Registers a provider for a contributed terminal profile.
The ID of the contributed terminal profile.
The terminal profile provider.
A disposable that unregisters the provider.
Register a file decoration provider.
A Disposable that unregisters the provider.
An Event which fires when the active color theme is changed or has changes.
Namespace for dealing with the current window of the editor. That is visible and active editors, as well as, UI elements to show messages, selections, and asking for user input.