Skip to content

Commit 6c6cd74

Browse files
pdeville2mickaelistria
authored andcommitted
GH-2167 Launch Group never terminates when many configurations are
disabled The previous patch was not completely fixed the issue. Fix issue #2167 Signed-off-by: Pauline DEVILLE <[email protected]>
1 parent 068ce09 commit 6c6cd74

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,10 @@ public void launch(ILaunchConfiguration groupConfig, String mode, final ILaunch
9696
SubMonitor progress = SubMonitor.convert(monitor, NLS.bind(DebugCoreMessages.GroupLaunchConfigurationDelegate_Launching, groupConfig.getName()), 1000);
9797

9898
List<GroupLaunchElement> launches = createLaunchElements(groupConfig);
99-
int nbEnabledLaunches = launches.stream().filter(l -> l.enabled).toList().size();
100-
for (int i = 0; i < launches.size(); ++i) {
99+
List<GroupLaunchElement> enabledLaunches = launches.stream().filter(l -> l.enabled).toList();
100+
for (int i = 0; i < enabledLaunches.size(); ++i) {
101101
GroupLaunchElement le = launches.get(i);
102102

103-
if (!le.enabled) {
104-
continue;
105-
}
106-
107103
// find launch; if not found, skip (error?)
108104
final ILaunchConfiguration conf = findLaunchConfiguration(le.name);
109105
if (conf == null) {
@@ -128,7 +124,7 @@ public void launch(ILaunchConfiguration groupConfig, String mode, final ILaunch
128124
// loop detected. report as appropriate and die.
129125
IStatusHandler cycleHandler = DebugPlugin.getDefault().getStatusHandler(GROUP_CYCLE);
130126
cycleHandler.handleStatus(GROUP_CYCLE, conf.getName());
131-
} else if (!launchChild(progress.newChild(1000 / nbEnabledLaunches), group, le, conf, localMode, (i == nbEnabledLaunches - 1))) {
127+
} else if (!launchChild(progress.newChild(1000 / enabledLaunches.size()), group, le, conf, localMode, (i == enabledLaunches.size() - 1))) {
132128
break;
133129
}
134130

0 commit comments

Comments
 (0)