Commit Graph

15 Commits

Author SHA1 Message Date
Alex Dima
973684056e Rename modes to languages 2021-12-30 18:52:15 +01:00
Matt Bierner
9ee751e859 Error if registering an unsupported scheme for external opener
Fixes #115168
2021-01-26 17:46:09 -08:00
Matt Bierner
0ede524326 Reword multiple external opener error
Fixes #115163
2021-01-26 16:13:14 -08:00
Matt Bierner
542de8e009 Move schemes to opener metadata 2021-01-21 14:41:25 -08:00
Matt Bierner
cc5e8b22fa Continue work on url opener api
For #109277

- Add `option` opener priority. This means the oper will only be shown if requested but will not replace the default opener
- Persist registered openers for IntelliSense suggestions
2021-01-14 17:06:14 -08:00
Matt Bierner
5d6cba5cbc Reworking external opener implementation to allow configured openers to be called directly without a canOpen check
If the user has configured a specific external uri opener, we should always try to use that without first calling `canOpen` to filter down the list of openers.

This change also adds `ExternalUriOpenerEnablement` which allows an opener to mark itself as the preferred opener for a given uri. If only a single preferred opener is returned, it will be used automatically for that uri (although user configuration can override this)
2021-01-14 10:37:00 -08:00
Matt Bierner
47aa3ad09a Continue work on opener service
- Add error notification if opener throws an exception
- Add public facing id to openers. This is used in settings
- Add intellisense for the opener id setting
2021-01-13 12:53:18 -08:00
Matt Bierner
b6435bc424 Remove unused import 2021-01-12 16:26:44 -08:00
Matt Bierner
47a135e715 Rework opener api proposal
For #109277

- Add more explicit two phase structure to api
- Make opener pass along label when registered
2021-01-12 16:14:42 -08:00
Matt Bierner
0227681492 Add new external uri opener service
This workbench service handles opening external uris. Unlike the core OpenerService, it also has logic for configuring a default opener and prompting if multiple openers are availble for a given uri
2021-01-12 12:41:15 -08:00
Matt Bierner
acda4aed82 Make the external opener a two phase process
This changes makes a few changes to the openers:

- Move the opener prompting from the extension host into the main thread
- Make the external opener process two phases: get openers and then open. This would let us skip the trusted domain validation for extension handled links if we want to in the future
- Add lifecycle to commands used by the uri opener

For #109277
2021-01-07 17:42:12 -08:00
Matt Bierner
e2c305f3a3 Allow registering additional external uri openers
This change moves the extension uri opener contribution point to instead use the internal `IExternalOpener` api instead of the more generic `IOpener` api. This is required since external uri openers should see the resolved uri that has gone through port forwarding, not the raw uri that the user clicked on
2021-01-07 11:41:07 -08:00
Matt Bierner
d6e8feb774 Check in additional file for uri opener api change 2020-12-16 15:46:54 -08:00
Matt Bierner
423076ab49 Pass schemes to main thread 2020-12-16 15:32:08 -08:00
Matt Bierner
6d3c2e6835 Adding proposed external uri opener API
For #109277
2020-12-15 16:26:47 -08:00