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
Full plumb through of Session support. Also fixed some test issues
- Load session and get necessary information in kernels list
- Run Cell button now works as expected
- Added a ToggleAction base class which can be used for anything that switches icons. I'd still prefer to have this be dynamic and as clean as the extension classes
- Fixed account test unhandled promise rejections (caused by incorrect / invalid tests) that made it hard to see all the test run output.
* Stop showing decorationsOverviewRuler in notebook code cells by setting hidden visibility in css
* Also change overviewRuler options in IEdtorOptions for safety
* address CR comments in css file
* 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.
* Support notebook file types contribution
- Extensions can define a provider and what file types it should be used for
- Verified that this works for Jupyter Content & Server Managers.
- Starts Jupyter server as expected
Not in this PR:
- Support for session manager end to end
- Tests