-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to pass argument for 'mini-browser.openUrl' command #4243
Conversation
@RomanNikitenko Is it to implement #4051? |
@akosyakov I need it for eclipse-che/che#11458 to implement Preview URL functionality, so to replace this part code of extension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, please have a look at comments though
@@ -170,7 +170,7 @@ export class MiniBrowserOpenHandler extends NavigatableWidgetOpenHandler<MiniBro | |||
isVisible: widget => !!this.getSourceUri(widget) | |||
}); | |||
commands.registerCommand(MiniBrowserCommands.OPEN_URL, { | |||
execute: () => this.openUrl() | |||
execute: (arg: string) => this.openUrl(arg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arg?: string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, thank you!
@@ -243,8 +243,8 @@ export class MiniBrowserOpenHandler extends NavigatableWidgetOpenHandler<MiniBro | |||
return uri; | |||
} | |||
|
|||
protected async openUrl(): Promise<void> { | |||
const url = await this.quickInputService.open({ | |||
protected async openUrl(arg: string | undefined): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arg?: string
should be optional, for backward compatibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, thank you!
@akosyakov I don't think so, in VS Code for "previewHtml" used TextDocumentContentProviders |
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
bb0d63a
to
5d4dbf5
Compare
Ability to pass argument for 'mini-browser.openUrl' command will allow to open URL in the Preview Tab without asking user to enter this one.
It would be very useful for plugin side, for example.
Signed-off-by: Roman Nikitenko rnikiten@redhat.com