VSCodeBridgeAdapter class

Implementation of VSCodeAdapter using VSCodeBridgeClient.

This adapter provides the bridge between the VS Code Scripting API and the socket-based VS Code Bridge Client for CLI tools like d4rt.

Example:

final client = VSCodeBridgeClient(port: 19900);
if (await client.connect()) {
  final adapter = VSCodeBridgeAdapter(client);
  VSCode.initialize(adapter);
  // Now vscode globals are available
}
Implemented types

Constructors

VSCodeBridgeAdapter(VSCodeBridgeClient client)
Creates a VS Code bridge adapter.

Properties

client VSCodeBridgeClient
The underlying bridge client.
final
hashCode int
The hash code for this object.
no setterinherited
isConnected bool
Whether the underlying client is connected.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

disconnect() Future<void>
Disconnect the underlying client.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendRequest(String method, Map<String, dynamic> params, {String? scriptName, Duration timeout = const Duration(seconds: 60)}) Future<Map<String, dynamic>>
Send a request to VS Code and wait for the response
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited