From 2da050751c74e8e0019c040c53c73bc8918cb356 Mon Sep 17 00:00:00 2001 From: Tobias Melcher Date: Mon, 16 Dec 2024 16:11:09 +0100 Subject: [PATCH] don't show key binding in UI when command is not handled or not enabled --- .../org/eclipse/ui/internal/keys/show/ShowKeysUI.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/keys/show/ShowKeysUI.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/keys/show/ShowKeysUI.java index afe4aa2b576..e39d1be9128 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/keys/show/ShowKeysUI.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/keys/show/ShowKeysUI.java @@ -87,6 +87,9 @@ private void open(String commandId, String description, Event trigger, boolean f try { ICommandService cmdService = this.serviceLocator.getService(ICommandService.class); Command command = cmdService.getCommand(commandId); + if (!command.isHandled() || !command.isEnabled()) { + return; + } String name = command.getName(); if (description == null) { description = command.getDescription();