split mainThreadNotebook up into logical pieces

* notebookDocumentsAndEditors -> owns the truth of the notebooks and editor that extensions know about
* notebookEditor -> everything about editors
* notebookDocuments -> everything about documents
This commit is contained in:
Johannes Rieken
2021-03-31 15:44:31 +02:00
parent dd360b25da
commit fa48622fdf
9 changed files with 624 additions and 437 deletions

View File

@@ -8,7 +8,7 @@ import { Disposable, DisposableStore, dispose } from 'vs/base/common/lifecycle';
import { Schemas } from 'vs/base/common/network';
import { deepFreeze, equals } from 'vs/base/common/objects';
import { URI } from 'vs/base/common/uri';
import { CellKind, INotebookDocumentPropertiesChangeData, MainThreadNotebookShape } from 'vs/workbench/api/common/extHost.protocol';
import { CellKind, INotebookDocumentPropertiesChangeData, MainThreadNotebookDocumentsShape } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostDocuments } from 'vs/workbench/api/common/extHostDocuments';
import { ExtHostDocumentsAndEditors, IExtHostModelAddedData } from 'vs/workbench/api/common/extHostDocumentsAndEditors';
import * as extHostTypeConverters from 'vs/workbench/api/common/extHostTypeConverters';
@@ -149,7 +149,7 @@ export class ExtHostNotebookDocument extends Disposable {
private _disposed: boolean = false;
constructor(
private readonly _proxy: MainThreadNotebookShape,
private readonly _proxy: MainThreadNotebookDocumentsShape,
private readonly _textDocumentsAndEditors: ExtHostDocumentsAndEditors,
private readonly _textDocuments: ExtHostDocuments,
private readonly _emitter: INotebookEventEmitter,