Repository navigation
Conversation
When a user opens a single Java file with no workspace folder, or a workspace folder with just a single Java file, show an information message recommending the JBang extension for running Java scripts. Includes option to install the jbang-vscode extension from the marketplace, and a 'Don't Show Again' option to suppress future notifications. Fixes redhat-developer#3111
datho7561
requested changes
Nov 13, 2026
| ); | ||
|
|
||
| if (choice === install) { | ||
| await commands.executeCommand(Commands.OPEN_BROWSER, Uri.parse(JBANG_MARKETPLACE_URL)); |
Contributor
There was a problem hiding this comment.
It's possible to actually install the extension for the user instead of just opening the web browser to the website for the extension. The command for this is "workbench.extensions.installExtension" and it accepts the extension id as an argument.
It's also possible to open the extensions panel and enter the extension ID if you think that's too invasive. However, given the user's clicked "Install" I think it's fine to go ahead and install it.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a user opens a single Java file with no workspace folder (standalone mode) or a workspace with just a single Java file, show an information message recommending the JBang extension for running Java scripts. Includes an "Install JBang" option that opens the jbang-vscode extension in the marketplace, and a "Don't Show Again" option to suppress future notifications.
Fixes #3111