Add intellisense for onOpenExternalUri activation and rename event
Fixes #115131 Also renames the activation event to `onOpenExternalUri`
This commit is contained in:
parent
7d5052f508
commit
d9ff550d02
|
@ -19,8 +19,8 @@
|
|||
"activationEvents": [
|
||||
"onCommand:simpleBrowser.show",
|
||||
"onCommand:simpleBrowser.api.open",
|
||||
"onUriOpen:http",
|
||||
"onUriOpen:https"
|
||||
"onOpenExternalUri:http",
|
||||
"onOpenExternalUri:https"
|
||||
],
|
||||
"contributes": {
|
||||
"commands": [
|
||||
|
|
2
src/vs/vscode.proposed.d.ts
vendored
2
src/vs/vscode.proposed.d.ts
vendored
|
@ -2623,7 +2623,7 @@ declare module 'vscode' {
|
|||
/**
|
||||
* Register a new `ExternalUriOpener`.
|
||||
*
|
||||
* When a uri is about to be opened, an `onUriOpen:SCHEME` activation event is fired.
|
||||
* When a uri is about to be opened, an `onOpenExternalUri:SCHEME` activation event is fired.
|
||||
*
|
||||
* @param id Unique id of the opener, such as `myExtension.browserPreview`. This is used in settings
|
||||
* and commands to identify the opener.
|
||||
|
|
|
@ -56,7 +56,7 @@ export class MainThreadUriOpeners extends Disposable implements MainThreadUriOpe
|
|||
return;
|
||||
}
|
||||
|
||||
await this.extensionService.activateByEvent(`onUriOpen:${targetUri.scheme}`);
|
||||
await this.extensionService.activateByEvent(`onOpenExternalUri:${targetUri.scheme}`);
|
||||
|
||||
for (const [id, openerMetadata] of this._registeredOpeners) {
|
||||
if (openerMetadata.schemes.has(targetUri.scheme)) {
|
||||
|
|
|
@ -300,6 +300,11 @@ export const schema: IJSONSchema = {
|
|||
body: 'onUri',
|
||||
description: nls.localize('vscode.extension.activationEvents.onUri', 'An activation event emitted whenever a system-wide Uri directed towards this extension is open.'),
|
||||
},
|
||||
{
|
||||
label: 'onOpenExternalUri',
|
||||
body: 'onOpenExternalUri',
|
||||
description: nls.localize('vscode.extension.activationEvents.onOpenExternalUri', 'An activation event emitted whenever a external uri (such as an http or https link) is being opened.'),
|
||||
},
|
||||
{
|
||||
label: 'onCustomEditor',
|
||||
body: 'onCustomEditor:${9:viewType}',
|
||||
|
|
Loading…
Reference in a new issue