From 2cd8dfb4bf631ee73123e74538375e10bd98dc1b Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Wed, 3 Jun 2026 09:56:11 +0200 Subject: [PATCH] Trigger Show In for typed selection in Open Resource dialog The Show In action for a non-file resource was gated on the OK button's enabled state. When the resource was reached by typing a pattern rather than clicking the row, that state could lag behind the auto-selected first match, so Enter and the Open button did nothing. Act on the selected item directly, the same way the dialog opens a typed file, so a first-matched project triggers Show In via Enter or Open too. --- .../eclipse/ui/internal/ide/dialogs/OpenResourceDialog.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/OpenResourceDialog.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/OpenResourceDialog.java index 73aa7fe54ba..9fa13f62dc0 100644 --- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/OpenResourceDialog.java +++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/OpenResourceDialog.java @@ -309,9 +309,7 @@ protected void updateButtonsEnableState(IStatus status) { @Override protected void okPressed() { IStructuredSelection selected = getSelectedItems(); - Button okButton = getOkButton(); - if (selected.size() == 1 && !(selected.getFirstElement() instanceof IFile) - && okButton != null && okButton.isEnabled()) { + if (selected.size() == 1 && !(selected.getFirstElement() instanceof IFile)) { if (showSelectionInFirstShowInTarget(selected)) { return; }