|
22 | 22 | import java.util.Date; |
23 | 23 | import java.util.HashMap; |
24 | 24 | import java.util.HashSet; |
| 25 | +import java.util.Iterator; |
25 | 26 | import java.util.List; |
26 | 27 | import java.util.ResourceBundle; |
27 | 28 |
|
@@ -588,7 +589,9 @@ public ITypedElement getTarget() { |
588 | 589 | public ITypedElement[] getSelection() { |
589 | 590 | ArrayList<ITypedElement> result= new ArrayList<>(); |
590 | 591 | if (fMemberSelection != null) { |
591 | | - for (Object edition : fArrayList) { |
| 592 | + Iterator<Object> iter= fArrayList.iterator(); |
| 593 | + while (iter.hasNext()) { |
| 594 | + Object edition= iter.next(); |
592 | 595 | Object item= fMemberSelection.get(edition); |
593 | 596 | if (item != null) |
594 | 597 | result.add((ITypedElement) item); |
@@ -724,7 +727,7 @@ protected Image getEditionImage(ITypedElement selectedEdition, ITypedElement ite |
724 | 727 | return selectedEdition.getImage(); |
725 | 728 | if (selectedEdition instanceof HistoryItem) { |
726 | 729 | if (fTimeImage == null) { |
727 | | - String iconName = Utilities.getString(fBundle, "timeIcon", "obj16/resource_obj.svg"); //$NON-NLS-1$ //$NON-NLS-2$ |
| 730 | + String iconName= Utilities.getString(fBundle, "timeIcon", "obj16/resource_obj.svg"); //$NON-NLS-1$ //$NON-NLS-2$ |
728 | 731 | ImageDescriptor id= CompareUIPlugin.getImageDescriptor(iconName); |
729 | 732 | if (id != null) |
730 | 733 | fTimeImage= id.createImage(); |
@@ -1028,7 +1031,7 @@ private void addEdition(Pair pair) { |
1028 | 1031 | if (lastDay == null || day != dayNumber(((Date)lastDay.getData()).getTime())) { |
1029 | 1032 | lastDay= new TreeItem(fEditionTree, SWT.NONE); |
1030 | 1033 | if (fDateImage == null) { |
1031 | | - String iconName = Utilities.getString(fBundle, "dateIcon", "obj16/day_obj.svg"); //$NON-NLS-2$ //$NON-NLS-1$ |
| 1034 | + String iconName= Utilities.getString(fBundle, "dateIcon", "obj16/day_obj.svg"); //$NON-NLS-2$ //$NON-NLS-1$ |
1032 | 1035 | ImageDescriptor id= CompareUIPlugin.getImageDescriptor(iconName); |
1033 | 1036 | if (id != null) |
1034 | 1037 | fDateImage= id.createImage(); |
@@ -1099,8 +1102,9 @@ private void handleMemberSelect(Widget w) { |
1099 | 1102 | String pattern= Utilities.getString(fBundle, "treeTitleFormat"); //$NON-NLS-1$ |
1100 | 1103 | String title= MessageFormat.format(pattern, ((Item)w).getText()); |
1101 | 1104 | fEditionPane.setText(title); |
1102 | | - |
1103 | | - for (Object item : editions) { |
| 1105 | + Iterator<Object> iter= editions.iterator(); |
| 1106 | + while (iter.hasNext()) { |
| 1107 | + Object item= iter.next(); |
1104 | 1108 | if (item instanceof Pair) |
1105 | 1109 | addEdition((Pair) item); |
1106 | 1110 | } |
|
0 commit comments