|
1 | 1 | /******************************************************************************* |
2 | | - * Copyright (c) 2009, 2019 QNX Software Systems and others. |
| 2 | + * Copyright (c) 2009, 2019, 2025 QNX Software Systems and others. |
3 | 3 | * |
4 | 4 | * This program and the accompanying materials |
5 | 5 | * are made available under the terms of the Eclipse Public License 2.0 |
|
13 | 13 | * Freescale Semiconductor |
14 | 14 | * SSI Schaefer |
15 | 15 | * Alexander Fedorov <[email protected]> - Bug 529651 |
| 16 | + * Pauline DEVILLE <[email protected] - Issue 2167 |
16 | 17 | *******************************************************************************/ |
17 | 18 | package org.eclipse.debug.internal.core.groups; |
18 | 19 |
|
@@ -95,6 +96,7 @@ public void launch(ILaunchConfiguration groupConfig, String mode, final ILaunch |
95 | 96 | SubMonitor progress = SubMonitor.convert(monitor, NLS.bind(DebugCoreMessages.GroupLaunchConfigurationDelegate_Launching, groupConfig.getName()), 1000); |
96 | 97 |
|
97 | 98 | List<GroupLaunchElement> launches = createLaunchElements(groupConfig); |
| 99 | + int nbEnabledLaunches = launches.stream().filter(l -> l.enabled).toList().size(); |
98 | 100 | for (int i = 0; i < launches.size(); ++i) { |
99 | 101 | GroupLaunchElement le = launches.get(i); |
100 | 102 |
|
@@ -126,7 +128,7 @@ public void launch(ILaunchConfiguration groupConfig, String mode, final ILaunch |
126 | 128 | // loop detected. report as appropriate and die. |
127 | 129 | IStatusHandler cycleHandler = DebugPlugin.getDefault().getStatusHandler(GROUP_CYCLE); |
128 | 130 | 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))) { |
130 | 132 | break; |
131 | 133 | } |
132 | 134 |
|
|
0 commit comments