From f1c9085403bc4a14eea20aacd9c2f898416f7815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Thu, 2 Nov 2023 09:06:16 +0100 Subject: [PATCH] Deduplicate launch configs The same launch config might be returned by multiple LaunchShortcutExtension and is then shown twice. This simply filter items that where already seen to deduplicate such entries. Fix https://github.com/eclipse-platform/eclipse.platform/issues/527 --- Jenkinsfile | 2 +- debug/org.eclipse.debug.ui/META-INF/MANIFEST.MF | 2 +- .../eclipse/debug/ui/actions/ContextualLaunchAction.java | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2fb861c91fc..25d8fd8be70 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,6 @@ pipeline { options { - timeout(time: 40, unit: 'MINUTES') + timeout(time: 60, unit: 'MINUTES') buildDiscarder(logRotator(numToKeepStr:'5')) disableConcurrentBuilds(abortPrevious: true) } diff --git a/debug/org.eclipse.debug.ui/META-INF/MANIFEST.MF b/debug/org.eclipse.debug.ui/META-INF/MANIFEST.MF index afe9ff19a35..cb677098893 100644 --- a/debug/org.eclipse.debug.ui/META-INF/MANIFEST.MF +++ b/debug/org.eclipse.debug.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.debug.ui; singleton:=true -Bundle-Version: 3.18.300.qualifier +Bundle-Version: 3.18.400.qualifier Bundle-Activator: org.eclipse.debug.internal.ui.DebugUIPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java b/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java index 65b7cd7d4ae..7fa422c50be 100644 --- a/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java +++ b/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java @@ -15,11 +15,13 @@ import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.Set; import org.eclipse.core.expressions.Expression; import org.eclipse.core.expressions.IEvaluationContext; @@ -280,9 +282,12 @@ protected void fillMenu(Menu menu) { } } // now add collected launches + Set added = new HashSet<>(); for (Entry entry : launchConfigurations.entrySet()) { for (ILaunchConfiguration configuration : entry.getValue()) { - populateMenuItem(fMode, entry.getKey(), menu, configuration, accelerator++, null); + if (added.add(configuration)) { + populateMenuItem(fMode, entry.getKey(), menu, configuration, accelerator++, null); + } } }