Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.ui.editors')
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/QuickDiffConfigurationBlock.java8
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesBlock.java12
2 files changed, 11 insertions, 9 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/QuickDiffConfigurationBlock.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/QuickDiffConfigurationBlock.java
index 4531693e9..4da7156e7 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/QuickDiffConfigurationBlock.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/QuickDiffConfigurationBlock.java
@@ -16,6 +16,7 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
@@ -411,10 +412,9 @@ class QuickDiffConfigurationBlock implements IPreferenceConfigurationBlock {
}
private void initializeFields() {
- Iterator<Button> e= fCheckBoxes.keySet().iterator();
- while (e.hasNext()) {
- Button b= e.next();
- String key= fCheckBoxes.get(b);
+ for (Entry<Button, String> entry : fCheckBoxes.entrySet()) {
+ Button b = entry.getKey();
+ String key= entry.getValue();
b.setSelection(fStore.getBoolean(key));
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesBlock.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesBlock.java
index b44c54bbd..1a928e905 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesBlock.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SelectResourcesBlock.java
@@ -17,6 +17,7 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
import org.eclipse.swt.SWT;
@@ -864,14 +865,15 @@ class SelectResourcesBlock implements ICheckStateListener, ISelectionChangedList
Set<Object> selectedNodes= new HashSet<>();
checkedStateStore= new HashMap<>();
- //Update the store before the hierarchy to prevent updating parents
+ // Update the store before the hierarchy to prevent updating parents
// before all of the children are done
- Iterator<IContainer> keyIterator= items.keySet().iterator();
- while (keyIterator.hasNext()) {
- Object key= keyIterator.next();
+
+ for (Entry<IContainer, List<Object>> entry : items.entrySet()) {
+ Object key = entry.getKey();
primeHierarchyForSelection(key, selectedNodes);
- checkedStateStore.put(key, items.get(key));
+ checkedStateStore.put(key, entry.getValue());
}
+
// Update the checked tree items. Since each tree item has a selected
// item, all the tree items will be gray checked.

Back to the top