* Custom Editor exploration
For #77131
Adds a prototype of custom editors contributed by extensions. This change does the following:
- Introduces a new contribution point for the declarative parts of a custom editor
- Adds API for registering a webview editor provider. This lets VS Code decided when to create a webview editor
- Adds an `openWith` command that lets you select which editor to use to open a resource from the file explorer
- Adds a setting that lets you say that you always want to use a custom editor for a given file extension
- Hooks up auto opening of a custom editor when opening a file from quick open or explorer
- Adds a new extension that contributes a custom image preview for png and jpg files
Still needs a lot of UX work and testing. We are also going to explore a more generic "open handler" based approach for supporting custom editors
Revert
* Re-use existing custom editor if one is already open
* Don't re-create custom editor webview when clicking on already visible custom editor
* Move customEditorInput to own file
* First draft of serializing custom editor inputs
* Use glob patterns instead of simple file extensions for matching custom resoruces for custom editors
* Add descriptions
* Try opening standard editor while prompting for custom editor
* Make sure we hide image status on dispose
* Make sure we restore editor group too
* Use glob patterns for workbench.editor.custom
* Allow users to configure custom editors for additional file types
* Use filename glob instead of glob on full resource path
* Adding placeholder for prompt open with
* Add enableByDefault setting for editor contributions
* Enable custom editors by default and add `discretion` enum
Changes `enableByDefault` boolean to a `discretion` enum. This should give more flexibility if we want other options (such as forcing a given custom editor to always be used even if there are other default ones)
* Allow custom editors to specify both a scheme and filenamePattern they are active for
* Rework custom editor setting
* Don't allow custom editors to be enabled for all resources by a config mistake
* Replace built-in image editor with one from extension
* Adding reopen with command
* Improve comment
* Remove commented code
* Localize package.json and remove image
* Remove extra lib setting from tsconfig
Rebase of a number of incremental changes listed below
Move first level dispatchMessage into ForkedTsServerProcess
Goal is to move callbacks and other per-server state into `ForkedTsServerProcess`
Create forked ts server object syncrounously
There is no reason for this to be async anymore. Making this object sync reduces complexity and makes the code easier to reason about
Moving server relate functions into ForkedTSServer object
The goal here is to have a single "server" object that keeps track of all its relevant state. The service client would manage one of these servers at a time, starting new ones if needed and dispatching to old ones
Split server into own file
Use switch case instead of conditionals
Make pendingResponses readonly
Add typings for callback item
Improve naming
- Use more descriptive names
- Preview private vars with _
Use passed in version for getting command line args
Attach webview click handler to window instead of to document body
Fixes#48926
Change error handling for ts server exit and error
- Don't fire twice on error (once for the `once` and once for the `onError`)
- Flush callbacks on both exit and error.
Remove cancellationPipeName as state
Remove obsolete comment
Move all env generation into generatePatchedEnv
Extract server spawn into static method
Move spawn from static to be own factory class
Move providers from arguments to state on the spawner
Update js/ts grammar
Remove duplicate error handler
Cleaning up server fork
- Standarize names
- Extract methods
- Move some function to be private statics
- Move logging out of electron and into server.ts
Use undefined instead of null for optional value