mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
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)
This commit is contained in:
@@ -807,8 +807,8 @@ export interface MainThreadUriOpenersShape extends IDisposable {
|
||||
}
|
||||
|
||||
export interface ExtHostUriOpenersShape {
|
||||
$getOpenersForUri(uri: UriComponents, token: CancellationToken): Promise<readonly string[]>;
|
||||
$openUri(id: string, context: { resolveUri: UriComponents, sourceUri: UriComponents }, token: CancellationToken): Promise<void>;
|
||||
$canOpenUri(id: string, uri: UriComponents, token: CancellationToken): Promise<modes.ExternalUriOpenerEnablement>;
|
||||
$openUri(id: string, context: { resolvedUri: UriComponents, sourceUri: UriComponents }, token: CancellationToken): Promise<void>;
|
||||
}
|
||||
|
||||
export interface ITextSearchComplete {
|
||||
|
||||
Reference in New Issue
Block a user