refine NotebookCell API

This commit is contained in:
Johannes Rieken
2021-03-10 14:48:58 +01:00
parent afe0e2b9a7
commit 637b659e4a
8 changed files with 81 additions and 87 deletions

View File

@@ -643,7 +643,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape {
if (document) {
document.dispose();
this._documents.delete(revivedUri);
this._textDocumentsAndEditors.$acceptDocumentsAndEditorsDelta({ removedDocuments: document.notebookDocument.cells.map(cell => cell.uri) });
this._textDocumentsAndEditors.$acceptDocumentsAndEditorsDelta({ removedDocuments: document.notebookDocument.cells.map(cell => cell.document.uri) });
this._onDidCloseNotebookDocument.fire(document.notebookDocument);
}
@@ -782,7 +782,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape {
const statusBarItem = new NotebookCellStatusBarItemInternal(this._proxy, this._commandsConverter, cell, alignment, priority);
// Look up the ExtHostCell for this NotebookCell URI, bind to its disposable lifecycle
const parsedUri = CellUri.parse(cell.uri);
const parsedUri = CellUri.parse(cell.document.uri);
if (parsedUri) {
const document = this._documents.get(parsedUri.notebook);
if (document) {
@@ -932,7 +932,7 @@ export class NotebookCellStatusBarItemInternal extends Disposable {
const entry: INotebookCellStatusBarEntry = {
alignment: this.alignment === extHostTypes.NotebookCellStatusBarAlignment.Left ? CellStatusbarAlignment.LEFT : CellStatusbarAlignment.RIGHT,
cellResource: this.cell.uri,
cellResource: this.cell.document.uri,
command: this._command?.internal,
text: this.text,
tooltip: this.tooltip,