VSCode class
Main VS Code API wrapper class Provides unified access to all VS Code APIs through Dart
Usage:
final vscode = VSCode(adapter);
// Show message
await vscode.window.showInformationMessage('Hello from Dart!');
// Get workspace folders
final folders = await vscode.workspace.getWorkspaceFolders();
// Execute command
await vscode.commands.executeCommand('workbench.action.files.save');
Properties
- adapter → VSCodeAdapter
-
Get the adapter instance (for advanced use cases)
no setter
- chat ↔ VSCodeChat
-
latefinal
- commands ↔ VSCodeCommands
-
latefinal
- extensions ↔ VSCodeExtensions
-
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- lm ↔ VSCodeLanguageModel
-
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- window ↔ VSCodeWindow
-
latefinal
- workspace ↔ VSCodeWorkspace
-
latefinal
Methods
-
copyToClipboard(
String text, {int timeoutSeconds = 10}) → Future< void> - Copy to clipboard
-
getEnv(
{int timeoutSeconds = 10}) → Future< Map< String, dynamic> > - Get environment information
-
getVersion(
{int timeoutSeconds = 10}) → Future< String> - Get VS Code version
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openExternal(
String uri, {int timeoutSeconds = 30}) → Future< bool> - Open external URI (like browser)
-
readFromClipboard(
{int timeoutSeconds = 10}) → Future< String> - Read from clipboard
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → VSCode
-
Get the singleton instance
Throws if not initialized
no setter
- isInitialized → bool
-
Check if VSCode is initialized
no setter
Static Methods
-
initialize(
VSCodeAdapter adapter) → void - Initialize the static VSCode instance with an adapter