mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-19 10:06:19 +01:00
debug: update visualizers tree proposal, some initial implementation (#204877)
This commit is contained in:
@@ -30,6 +30,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
|
||||
private readonly _debugAdapterDescriptorFactories: Map<number, IDebugAdapterDescriptorFactory>;
|
||||
private readonly _extHostKnownSessions: Set<DebugSessionUUID>;
|
||||
private readonly _visualizerHandles = new Map<string, IDisposable>();
|
||||
private readonly _visualizerTreeHandles = new Map<string, IDisposable>();
|
||||
|
||||
constructor(
|
||||
extHostContext: IExtHostContext,
|
||||
@@ -112,6 +113,20 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
|
||||
this.sendBreakpointsAndListen();
|
||||
}
|
||||
|
||||
$registerDebugVisualizerTree(treeId: string, canEdit: boolean): void {
|
||||
this.visualizerService.registerTree(treeId, {
|
||||
disposeItem: id => this._proxy.$disposeVisualizedTree(id),
|
||||
getChildren: e => this._proxy.$getVisualizerTreeItemChildren(treeId, e),
|
||||
getTreeItem: e => this._proxy.$getVisualizerTreeItem(treeId, e),
|
||||
editItem: canEdit ? ((e, v) => this._proxy.$editVisualizerTreeItem(e, v)) : undefined
|
||||
});
|
||||
}
|
||||
|
||||
$unregisterDebugVisualizerTree(treeId: string): void {
|
||||
this._visualizerTreeHandles.get(treeId)?.dispose();
|
||||
this._visualizerTreeHandles.delete(treeId);
|
||||
}
|
||||
|
||||
$registerDebugVisualizer(extensionId: string, id: string): void {
|
||||
const handle = this.visualizerService.register({
|
||||
extensionId: new ExtensionIdentifier(extensionId),
|
||||
|
||||
Reference in New Issue
Block a user