Skip to content

Commit b963ce5

Browse files
pdeville2mickaelistria
authored andcommitted
GH-2167 Launch Group never terminates when the last configuration is
disabled Fix issue #2167 Signed-off-by: Pauline DEVILLE <[email protected]>
1 parent 51ac395 commit b963ce5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

debug/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2009, 2019 QNX Software Systems and others.
2+
* Copyright (c) 2009, 2019, 2025 QNX Software Systems and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -13,6 +13,7 @@
1313
* Freescale Semiconductor
1414
* SSI Schaefer
1515
* Alexander Fedorov <[email protected]> - Bug 529651
16+
* Pauline DEVILLE <[email protected] - Issue 2167
1617
*******************************************************************************/
1718
package org.eclipse.debug.internal.core.groups;
1819

@@ -95,6 +96,7 @@ public void launch(ILaunchConfiguration groupConfig, String mode, final ILaunch
9596
SubMonitor progress = SubMonitor.convert(monitor, NLS.bind(DebugCoreMessages.GroupLaunchConfigurationDelegate_Launching, groupConfig.getName()), 1000);
9697

9798
List<GroupLaunchElement> launches = createLaunchElements(groupConfig);
99+
int nbEnabledLaunches = launches.stream().filter(l -> l.enabled).toList().size();
98100
for (int i = 0; i < launches.size(); ++i) {
99101
GroupLaunchElement le = launches.get(i);
100102

@@ -126,7 +128,7 @@ public void launch(ILaunchConfiguration groupConfig, String mode, final ILaunch
126128
// loop detected. report as appropriate and die.
127129
IStatusHandler cycleHandler = DebugPlugin.getDefault().getStatusHandler(GROUP_CYCLE);
128130
cycleHandler.handleStatus(GROUP_CYCLE, conf.getName());
129-
} else if (!launchChild(progress.newChild(1000 / launches.size()), group, le, conf, localMode, (i == launches.size() - 1))) {
131+
} else if (!launchChild(progress.newChild(1000 / nbEnabledLaunches), group, le, conf, localMode, (i == nbEnabledLaunches - 1))) {
130132
break;
131133
}
132134

0 commit comments

Comments
 (0)