Skip to content

Commit

Permalink
Actually create notebook model on openNotebookDocument (#14029)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuebner authored Aug 9, 2024
1 parent 5255c51 commit 44d42ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ export class NotebookDocumentsMainImpl implements NotebookDocumentsMain {

async $tryOpenNotebook(uriComponents: UriComponents): Promise<UriComponents> {
const uri = URI.fromComponents(uriComponents);
await this.notebookModelResolverService.resolve(uri);
return uri.toComponents();
}

Expand Down
5 changes: 2 additions & 3 deletions packages/plugin-ext/src/plugin/plugin-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -740,9 +740,8 @@ export function createAPIFactory(
} else {
throw new Error('Invalid arguments');
}
const result = await notebooksExt.waitForNotebookDocument(uri);
return result.apiNotebook;

// Notebook extension will create a document in openNotebookDocument() or create openNotebookDocument()
return notebooksExt.getNotebookDocument(uri).apiNotebook;
},
createFileSystemWatcher: (pattern, ignoreCreate, ignoreChange, ignoreDelete): theia.FileSystemWatcher =>
extHostFileSystemEvent.createFileSystemWatcher(fromGlobPattern(pattern), ignoreCreate, ignoreChange, ignoreDelete),
Expand Down

0 comments on commit 44d42ec

Please # to comment.