Skip to content

Hide java.dashboard.refresh and java.dashboard.dumpState from Command… - #4538

Open
sripal2013 wants to merge 1 commit into
redhat-developer:mainfrom
sripal2013:fix-4381-hide-dashboard-commands
Open

sripal2013 wants to merge 1 commit into
redhat-developer:mainfrom
sripal2013:fix-4381-hide-dashboard-commands

Conversation

@sripal2013

Copy link
Copy Markdown

Fixes #4381

Running Java: Refresh (or Java: Dump State) from the Command Palette fails with command 'java.dashboard.refresh' not found when the Java Dashboard has never been opened. The command handlers are registered inside the dashboard webview class, so they only exist while the panel is alive. The when clause on contributes.commands does not control Command Palette visibility — contributes.menus.commandPalette does — and these two commands were never added there.

This adds both commands to contributes.menus.commandPalette with "when": "false", matching the 11 existing entries that already use this pattern for internal-only commands. The dashboard's own title-bar buttons (gated on webviewId == java.dashboard) keep working.

Test: fresh Extension Development Host window → Command Palette → "Java: Refresh" no longer appears (previously appeared and threw). Opened the Java Dashboard and confirmed its Refresh / Dump State toolbar buttons still work.

Note: #4382 attempted a different fix (register at activation and open the dashboard on invoke) but is stale and conflicted; this takes the minimal approach suggested in the issue thread.

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.

command 'java.dashboard.refresh' not found

1 participant