Fixes#95854Fixes#95849
For #77131
- Move all editing functionality back onto the provider. This better matches the notebook API.
- Rename `CustomEditorProvider` to `CustomReadonlyEditorProvider`. `CustomEditorProvider` is now how editable custom editors are implemented
- Give extension a full suggested backup path instead of just a folder
This change primarly adds a new `Open with...` entry to the explorer context menu. To do this however, I had to make a few other changes:
- Add a new explorer context key for availible editors
- Moved the editor select prompt into a new function called `openEditorWith`
- Use `openEditorWith` for the new `open with` explorer command as well as for the `reopen with` command
* debug: enable js-debug to auto attach
This modifies the debug-auto-launch extension to trigger js-debug as
outlined in https://github.com/microsoft/vscode/issues/88599#issuecomment-617242405
Since we now have four states, I moved the previous combinational logic
to a `transitions` map, which is more clear and reliable. The state
changes are also now a queue (in the form of a promise chain) which
should avoid race conditions.
There's some subtlety around how we cached the "ipcAddress" and know
that environment variables are set. The core desire is being able to
send a command to js-debug to set the environment variables only if they
haven't previously been set--otherwise, reused
the cached ones and the address.
This process (in `getIpcAddress`) would be vastly simpler if extensions
could read the environment variables that others provide, though there
may be security considerations since secrets are sometimes stashed
(though I could technically implement this today by manually creating
and terminal and running the appropriate `echo $FOO` command).
This seems to work fairly well in my testing. Fixes#88599.
* fix typo
* clear js-debug environment variables when disabling auto attach