make NotebookCellData and NotebookData classes, rename NotebookCellData#cellKind to NotebookCellData#kind

This commit is contained in:
Johannes Rieken
2021-03-05 15:17:48 +01:00
parent 86df444212
commit 6117524374
8 changed files with 70 additions and 47 deletions

View File

@@ -11,10 +11,11 @@ suite('Notebook Editor', function () {
const contentProvider = new class implements vscode.NotebookContentProvider {
async openNotebook(uri: vscode.Uri, _openContext: vscode.NotebookDocumentOpenContext): Promise<vscode.NotebookData> {
return {
cells: [{ cellKind: vscode.NotebookCellKind.Code, source: uri.toString(), language: 'javascript', metadata: new vscode.NotebookCellMetadata(), outputs: [] }],
metadata: new vscode.NotebookDocumentMetadata()
};
return new vscode.NotebookData(
[new vscode.NotebookCellData(vscode.NotebookCellKind.Code, uri.toString(), 'javascript')],
new vscode.NotebookDocumentMetadata()
);
}
async resolveNotebook(_document: vscode.NotebookDocument, _webview: vscode.NotebookCommunication) {
//