Skip to content

feat: recommend JBang for single Java file usage - #4573

Open
burhanv14 wants to merge 1 commit into
redhat-developer:mainfrom
burhanv14:feature/jbang-recommendation
Open

burhanv14 wants to merge 1 commit into
redhat-developer:mainfrom
burhanv14:feature/jbang-recommendation

Conversation

@burhanv14

@burhanv14 burhanv14 commented Nov 13, 2026 •

Copy link
Copy Markdown

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

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
Comment thread src/extension.ts
);

if (choice === install) {
await commands.executeCommand(Commands.OPEN_BROWSER, Uri.parse(JBANG_MARKETPLACE_URL));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider recommendation to install JBang

2 participants