Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2020-05-31 09:14:51 +0000
committerSarika Sinha2020-06-12 07:07:57 +0000
commit336df5b6269813a9795c40b5bf0c6a5e1475ba03 (patch)
treef5a195e7f78ae29b957e9dcea0f86ea486280f45 /org.eclipse.debug.ui
parent0666cd23d434626abbaeaaf6d5c42820e4172f10 (diff)
downloadeclipse.platform.debug-336df5b6269813a9795c40b5bf0c6a5e1475ba03.tar.gz
eclipse.platform.debug-336df5b6269813a9795c40b5bf0c6a5e1475ba03.tar.xz
eclipse.platform.debug-336df5b6269813a9795c40b5bf0c6a5e1475ba03.zip
Bug 551568 - add children to delegatesI20200612-0400
Change-Id: Ib911d62c6a4e066b0e15a924c778b1d64b39ceb3 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java
index 750ba5e74..2295df9b9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java
@@ -468,27 +468,22 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
//prep selection context, remove types from the equation
HashSet<ILaunchDelegate> delegates = new HashSet<>();
- Object o = null;
- for(int i = 0; i < selection.length; i++) {
- o = selection[i];
+ for (Object o : selection) {
if(o instanceof ILaunchDelegate) {
delegates.add((ILaunchDelegate) o);
}
else if(o instanceof ILaunchConfigurationType) {
fgCurrentWorkingContext.add(o);
- Object[] kids = fTreeViewer.getFilteredChildren(o);
- for (int j = 0; j < kids.length; j++) {
- delegates.add((ILaunchDelegate) kids[i]);
+ for (Object kid : fTreeViewer.getFilteredChildren(o)) {
+ delegates.add((ILaunchDelegate) kid);
}
}
}
//compare the listing of delegates to find common mode sets
HashSet<Set<String>> common = new HashSet<>();
- List<Set<String>> modes = null;
HashSet<Set<String>> pruned = new HashSet<>();
for (ILaunchDelegate delegate : delegates) {
- modes = delegate.getModes();
- for (Set<String> fmodes : modes) {
+ for (Set<String> fmodes : delegate.getModes()) {
if (isCommonModeset(fmodes, delegates, pruned)) {
common.add(fmodes);
fgCurrentWorkingContext.add(delegate);

Back to the top