Changeset 19444 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2025-10-15T16:18:24+02:00 (6 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/corrector/TagCorrector.java
r17733 r19444 14 14 import java.util.Map.Entry; 15 15 import java.util.Set; 16 import java.util.stream.Collectors; 16 17 17 18 import javax.swing.JLabel; … … 32 33 import org.openstreetmap.josm.gui.correction.TagCorrectionTable; 33 34 import org.openstreetmap.josm.gui.widgets.JMultilineLabel; 35 import org.openstreetmap.josm.tools.AlphanumComparator; 34 36 import org.openstreetmap.josm.tools.GBC; 35 37 import org.openstreetmap.josm.tools.ImageProvider; … … 95 97 96 98 for (Entry<OsmPrimitive, List<TagCorrection>> entry : tagCorrectionsMap.entrySet()) { 99 if (entry.getValue().isEmpty()) 100 continue; 101 97 102 final OsmPrimitive primitive = entry.getKey(); 98 final List<TagCorrection> tagCorrections = entry.getValue(); 99 100 if (tagCorrections.isEmpty()) { 101 continue; 102 } 103 final List<TagCorrection> tagCorrections = entry.getValue().stream() 104 .sorted((o1, o2) -> AlphanumComparator.getInstance().compare(o1.oldKey, o2.oldKey)) 105 .collect(Collectors.toList()); 103 106 104 107 final JLabel propertiesLabel = new JLabel(tr("Tags of ")); … … 112 115 p.add(primitiveLabel, GBC.eol()); 113 116 114 final TagCorrectionTable table = new TagCorrectionTable( 115 tagCorrections); 117 final TagCorrectionTable table = new TagCorrectionTable(tagCorrections); 116 118 final JScrollPane scrollPane = new JScrollPane(table); 117 119 p.add(scrollPane, GBC.eop().fill(GBC.BOTH)); … … 121 123 122 124 for (Entry<OsmPrimitive, List<RoleCorrection>> entry : roleCorrectionMap.entrySet()) { 125 if (entry.getValue().isEmpty()) 126 continue; 127 123 128 final OsmPrimitive primitive = entry.getKey(); 124 final List<RoleCorrection> roleCorrections = entry.getValue(); 125 126 if (roleCorrections.isEmpty()) { 127 continue; 128 } 129 final List<RoleCorrection> roleCorrections = entry.getValue().stream() 130 .sorted((o1, o2) -> DefaultNameFormatter.getInstance().getRelationComparator() 131 .compare(o1.relation, o2.relation)) 132 .collect(Collectors.toList()); 129 133 130 134 final JLabel rolesLabel = new JLabel(tr("Roles in relations referring to"));
Note:
See TracChangeset
for help on using the changeset viewer.