From b638b635af851ff2cd2bfd13045b3ab0559ac8a3 Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Wed, 3 Jun 2026 12:36:38 +0200 Subject: [PATCH] Update Show In MRU when triggered from Open Resource dialog Using Show In from the Open Resource dialog, either via the dropdown or the implicit action on a non-file selection, opened the target view but never updated the most-recently-used order. Both paths call showView and IShowInTarget.show directly instead of the Navigate > Show In command, so WorkbenchPage.performedShowIn was never invoked and the MRU list stayed unchanged. Promote the used target via performedShowIn after a successful show, so the Open Resource dialog feeds the same MRU as the regular Show In. Fixes https://github.com/eclipse-platform/eclipse.platform.ui/issues/4058 --- .../ui/internal/ide/dialogs/OpenResourceDialog.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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..2422df0095c 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 @@ -126,7 +126,11 @@ public void run() { try { view = page.showView(targetId); IShowInTarget target = getShowInTarget(view); - if (!(target != null && target.show(getContext(null)))) { + if (target != null && target.show(getContext(null))) { + if (page instanceof WorkbenchPage workbenchPage) { + workbenchPage.performedShowIn(targetId); + } + } else { page.getWorkbenchWindow().getShell().getDisplay().beep(); } } catch (PartInitException e) { @@ -355,6 +359,8 @@ private boolean showSelectionInFirstShowInTarget(IStructuredSelection selection) IShowInTarget target = Adapters.adapt(view, IShowInTarget.class); if (target == null || !target.show(new ShowInContext(null, selection))) { activePage.getWorkbenchWindow().getShell().getDisplay().beep(); + } else { + workbenchPage.performedShowIn(descriptor.getId()); } } catch (PartInitException e) { StatusManager.getManager().handle(new Status(IStatus.ERROR, IDEWorkbenchPlugin.IDE_WORKBENCH,