* Handle delayed Notebook provider registration
- Fixes#3197 Notebooks: builtin provider always used on reopen with notebook file visible
- Fixes#3414 Can't refresh kernel after connect to big data cluster
There are 3 parts to this fix:
- If no notebook provider other than the default is installed, we warn users and prompt to install the SQL2019 extension
- We wait on the extension host registration to complete before determining which provider to use
- We know that the extension registration of the provider instance will be after package.json is read, so if we wait after registration for 10 seconds to give this a chance to happen before returning a provider to the front end
* Remove launch.json change that was added accidentally
* Fix timeout not being the expected value
* Removed console log left in during debugging
* Remove unnecessary whitespace
* Fix unit test failure
* Name the registration better, and remove outdated comments
* Notebook saves are broken #3432
* Misc change
* Save notebook uri to This
* Untitled notebook save including review comments #3432
* Cleanup
* Misc changes
- Add edit API that can be used in the extension
- Separated document and editor classes out since this is the point those get big. I can refactor back in if needed to ease code review
- Based this off text editing APIs but tweaked for the fact this is a cell/array based set of edits
* Allow for cell unselection
* PR Feedback: use event.stopPropagation() when multiple events can fire
* Ensure markdown goes into Preview mode when cell not selected
initial support for Notebook extensibility. Fixes#3148 , Fixes#3382.
## Design notes
The extensibility patterns are modeled after the VSCode Document and Editor APIs but need to be different since core editor concepts are different - for example Notebooks have cells, and cells have contents rather than editors which have text lines.
Most importantly, a lot of the code is based on the MainThreadDocumentsAndEditors class, with some related classes (the MainThreadDocuments, and MainThreadEditors) brought in too. Given our current limitations I felt moving to add 3 full sets of extension host API classes was overkill so am currently using one. Will see if we need to change this in the future based on what we add in the additional APIs
## Limitations
The current implementation is limited to visible editors, rather than all documents in the workspace. We are not following the `openDocument` -> `showDocument` pattern, but instead just supporting `showDocument` directly.
## Changes in this PR
- Renamed existing APIs to make clear that they were about notebook contents, not about notebook behavior
- Added new APIs for querying notebook documents and editors
- Added new API for opening a notebook
- Moved `New Notebook` command to an extension, and added an `Open Notebook` command too
- Moved notebook feature flag to the extension
## Not covered in this PR
- Need to actually implement support for defining the provider and connection IDs for a notebook. this will be important to support New Notebook from a big data connection in Object Explorer
- Need to add APIs for adding cells, to support
- Need to implement the metadata for getting full notebook contents. I've only implemented to key APIs needed to make this all work.
* Hide ToggleMoreAction for inactive cell
* Revert wrong merge
* Undo bad merge
* Enable markdown to hide ToggleMoreAction
* Resolve PR comments
* Fixed the name
* Change name
* Fix toggleMoreActions by passing in CellContext instead of just nb model
* Fixed the warning by removing notificationService from the caller
* first attach to working
* Transfer changes from sqlopsstudioextensions PR 448
* Transfer changes from sqlopsstudioextensions PR 447
* Transfer changes from sqlopsstudioextensions PR 456
* Transfer changes from sqlopsstudioextensions PR 465
* Transfer changes from sqlopsstudioextensions PR 463
* Transfer changes from sqlopsstudioextensions PR 482
* Transfer changes from sqlopsstudioextensions PR 485
* Session and Kernel implementation except executeRequest
* Attach to port compiling
* Further tweaks to attach to dropdown, re-enable opening connection dialog
* Revert "Merge remote-tracking branch 'origin/Notebook/sessionExtension' into feature/workingAttachTo"
This reverts commit 94703db87c85416c4ae36762afc1094d6e71166a, reversing
changes made to e4dc25331036d259e9c762cfe8741f957bb5c590.
* Fix code formatting
* Fix for new Add new connection issue
* Added toggle more actions to cell
* Resolve PR comments
-- Added INotificationService for notification msg
* Reduced ToggleMoreAction to smaller size. So the dropdown could be displayed closer to it instead of at the buttom of the cell.
* Initial toolbar work
- This is in-progress and needs additional fixes
* Resolve PR comments
* Added empty kernel and hook up with Kernel dropdown
* Resolve PR comments
Implements provider contribution in the MainThreadNotebook, with matching function calls in the ExtHostNotebook class. This will allow us to proxy through notebook providers (specifically, creation of a notebook manager with required content, server managers) from an extension up through to the main process.
Implemented in this PR:
- Callthroughs for content and server manager APIs
- Very basic unit tests covering provider & manager registration
Not implemented:
- Fuller unit tests on the specific callthrough methods for content & server manager.
- Contribution point needed to test this (so we can actually pass through the extension's existing Notebook implementation)
- Defines a new NotebookService in Azure Data Studio which will be used to interact with notebooks. Since notebooks can require per-file instantiation the provider is just used to create & track managers for a given URI.
- Inject this into notebook.component.ts and pass required parameters that'll be used to properly initialize a manger into the method. Actual initialization not done yet.
- Port over & recompile notebook model code
- Define most required APIs in sqlops.proposed.d.ts. In the future, these will be used by extensions to contribute their own providers.
* initial work for addig code and code cell type
* add cell model and create editor for each cell
* formatting
* fix resizing issue
* small changes
* address comment