Changeset 34972 in osm for applications/editors/josm/plugins
- Timestamp:
- 2019-04-11T02:04:26+02:00 (5 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/merge-overlap/src/mergeoverlap/MergeOverlapAction.java
r34664 r34972 37 37 import org.openstreetmap.josm.tools.Shortcut; 38 38 import org.openstreetmap.josm.tools.UserCancelException; 39 import org.openstreetmap.josm.tools.Utils; 39 40 40 41 import mergeoverlap.hack.MyCombinePrimitiveResolverDialog; … … 80 81 ways.add(way); 81 82 List<Relation> rels = new ArrayList<>(); 82 for (Relation r : OsmPrimitive.getFilteredList(way.getReferrers(), Relation.class)) {83 for (Relation r : Utils.filteredCollection(way.getReferrers(), Relation.class)) { 83 84 rels.add(r); 84 85 } -
applications/editors/josm/plugins/opendata/build.xml
r34805 r34972 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <project name="opendata" default="dist" basedir="."> 3 <property name="plugin.main.version" value="14 347"/>3 <property name="plugin.main.version" value="14977"/> 4 4 <property name="plugin.author" value="Don-vip"/> 5 5 <property name="plugin.class" value="org.openstreetmap.josm.plugins.opendata.OdPlugin"/> -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeographicReader.java
r34899 r34972 64 64 import org.openstreetmap.josm.tools.ImageProvider.ImageSizes; 65 65 import org.openstreetmap.josm.tools.Logging; 66 import org.openstreetmap.josm.tools.ReflectionUtils; 66 67 import org.openstreetmap.josm.tools.UserCancelException; 67 68 import org.openstreetmap.josm.tools.Utils; … … 354 355 try { 355 356 Field f = AbstractIdentifiedObject.class.getDeclaredField("identifiers"); 356 Utils.setObjectsAccessible(f);357 ReflectionUtils.setObjectsAccessible(f); 357 358 f.set(crs, Collections.singleton(new NamedIdentifier(Citations.fromName("EPSG"), epsgCode.toString()))); 358 359 } catch (ReflectiveOperationException | SecurityException e) { -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/TabFiles.java
r34019 r34972 19 19 import org.openstreetmap.josm.tools.JosmRuntimeException; 20 20 import org.openstreetmap.josm.tools.Logging; 21 import org.openstreetmap.josm.tools. Utils;21 import org.openstreetmap.josm.tools.ReflectionUtils; 22 22 23 23 /** … … 40 40 try { 41 41 Field furls = ShpFiles.class.getDeclaredField("urls"); 42 Utils.setObjectsAccessible(furls);42 ReflectionUtils.setObjectsAccessible(furls); 43 43 urls = (Map<ShpFileType, URL>) furls.get(this); 44 44 } catch (ReflectiveOperationException e) { -
applications/editors/josm/plugins/print/build.xml
r34547 r34972 5 5 <property name="commit.message" value="Added a field to specify the map scale."/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="14 153"/>7 <property name="plugin.main.version" value="14977"/> 8 8 9 9 <property name="plugin.author" value="Kai Pastor"/> -
applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintDialog.java
r34547 r34972 64 64 import org.openstreetmap.josm.tools.GBC; 65 65 import org.openstreetmap.josm.tools.Logging; 66 import org.openstreetmap.josm.tools. Utils;66 import org.openstreetmap.josm.tools.ReflectionUtils; 67 67 68 68 /** … … 524 524 Method getEnumValueTable = realClass.getDeclaredMethod("getEnumValueTable"); 525 525 Constructor<? extends Attribute> constructor = realClass.getDeclaredConstructor(int.class); 526 Utils.setObjectsAccessible(getEnumValueTable, constructor);526 ReflectionUtils.setObjectsAccessible(getEnumValueTable, constructor); 527 527 Attribute fakeInstance = constructor.newInstance(Integer.MAX_VALUE); 528 528 EnumSyntax[] enumTable = (EnumSyntax[]) getEnumValueTable.invoke(fakeInstance); -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SplittingMultipolygons.java
r34551 r34972 31 31 import org.openstreetmap.josm.tools.Geometry; 32 32 import org.openstreetmap.josm.tools.Geometry.PolygonIntersection; 33 import org.openstreetmap.josm.tools.Utils; 33 34 34 35 /** … … 253 254 254 255 List<Way> ways = intersection( 255 OsmPrimitive.getFilteredList(segment.firstNode().getReferrers(), Way.class),256 OsmPrimitive.getFilteredList(segment.lastNode().getReferrers(), Way.class));256 Utils.filteredCollection(segment.firstNode().getReferrers(), Way.class), 257 Utils.filteredCollection(segment.lastNode().getReferrers(), Way.class)); 257 258 ways.remove(segment); 258 259 for (Iterator<Way> iter = ways.iterator(); iter.hasNext();) { -
applications/editors/josm/plugins/simplifyarea/src/org/openstreetmap/josm/plugins/simplifyarea/SimplifyAreaAction.java
r34586 r34972 40 40 import org.openstreetmap.josm.tools.ImageProvider; 41 41 import org.openstreetmap.josm.tools.Shortcut; 42 import org.openstreetmap.josm.tools.Utils; 42 43 43 44 public final class SimplifyAreaAction extends JosmAction { … … 108 109 } 109 110 } 110 final Collection<Way> ways = OsmPrimitive.getFilteredSet(selection, Way.class);111 final Collection<Way> ways = Utils.filteredCollection(selection, Way.class); 111 112 if (ways.isEmpty()) { 112 113 alertSelectAtLeastOneWay(); -
applications/editors/josm/plugins/terracer/src/org/openstreetmap/josm/plugins/terracer/TerracerAction.java
r34584 r34972 47 47 import org.openstreetmap.josm.tools.Shortcut; 48 48 import org.openstreetmap.josm.tools.UserCancelException; 49 import org.openstreetmap.josm.tools.Utils; 49 50 50 51 /** … … 119 120 outline = (Way) prim; 120 121 } else if (sel.size() > 1) { 121 List<Way> ways = OsmPrimitive.getFilteredList(sel, Way.class);122 List<Way> ways = new ArrayList<>(Utils.filteredCollection(sel, Way.class)); 122 123 Iterator<Way> wit = ways.iterator(); 123 124 while (wit.hasNext()) { … … 143 144 throw new InvalidUserInputException("no outline way found"); 144 145 145 List<Node> nodes = OsmPrimitive.getFilteredList(sel, Node.class);146 List<Node> nodes = new ArrayList<>(Utils.filteredCollection(sel, Node.class)); 146 147 Iterator<Node> nit = nodes.iterator(); 147 148 // Actually this should test if the selected address nodes lie
Note:
See TracChangeset
for help on using the changeset viewer.