Changeset 10000 in josm for trunk/src/org
- Timestamp:
- 2016-03-16T01:17:59+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JosmAction.java
r9675 r10000 71 71 * @param toolbarId identifier for the toolbar preferences. The iconName is used, if this parameter is null 72 72 * @param installAdapters false, if you don't want to install layer changed and selection changed adapters 73 * TODO: do not pass Icon, pass ImageProvider instead74 73 */ 75 74 public JosmAction(String name, ImageProvider icon, String tooltip, Shortcut shortcut, boolean registerInToolbar, -
trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
r9991 r10000 274 274 } 275 275 276 private boolean isSimilar(ImageryInfo iiA, ImageryInfo iiB) {276 private static boolean isSimilar(ImageryInfo iiA, ImageryInfo iiB) { 277 277 if (iiA == null) 278 278 return false; -
trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java
r9902 r10000 293 293 XMLInputFactory factory = XMLInputFactory.newFactory(); 294 294 // do not try to load external entities, nor validate the XML 295 factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);296 factory.setProperty(XMLInputFactory.IS_VALIDATING, false);297 factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);295 factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE); 296 factory.setProperty(XMLInputFactory.IS_VALIDATING, Boolean.FALSE); 297 factory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.FALSE); 298 298 299 299 try (CachedFile cf = new CachedFile(baseUrl); InputStream in = cf.setHttpHeaders(headers). -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r9978 r10000 391 391 } 392 392 393 private Polygon buildPolygon(Point center, int radius, int sides) {393 private static Polygon buildPolygon(Point center, int radius, int sides) { 394 394 return buildPolygon(center, radius, sides, 0.0); 395 395 } -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/MultipolygonCache.java
r8870 r10000 189 189 } 190 190 191 private void processEvent(AbstractDatasetChangedEvent event, Relation r, Collection<Map<Relation, Multipolygon>> maps) {191 private static void processEvent(AbstractDatasetChangedEvent event, Relation r, Collection<Map<Relation, Multipolygon>> maps) { 192 192 if (event instanceof NodeMovedEvent || event instanceof WayNodesChangedEvent) { 193 193 dispatchEvent(event, r, maps); -
trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java
r9790 r10000 571 571 } 572 572 if (parameters.containsKey(Param.no_off.key) || parameters.containsKey(Param.no_uoff.key)) { 573 projParams.no_off = true;573 projParams.no_off = Boolean.TRUE; 574 574 } 575 575 proj.initialize(projParams); … … 713 713 /** 714 714 * Factor to convert units of east/north coordinates to meters. 715 * 715 * 716 716 * When east/north coordinates are in degrees (geographic CRS), the scale 717 717 * at the equator is taken, i.e. 360 degrees corresponds to the length of 718 718 * the equator in meters. 719 * 719 * 720 720 * @return factor to convert units to meter 721 721 */ … … 780 780 } 781 781 782 private EastNorth getPointAlong(int i, int N, ProjectionBounds r) {782 private static EastNorth getPointAlong(int i, int N, ProjectionBounds r) { 783 783 double dEast = (r.maxEast - r.minEast) / N; 784 784 double dNorth = (r.maxNorth - r.minNorth) / N; -
trunk/src/org/openstreetmap/josm/data/projection/proj/ObliqueMercator.java
r9998 r10000 368 368 } 369 369 370 private double normalizeLonRad(double a) {370 private static double normalizeLonRad(double a) { 371 371 return Math.toRadians(LatLon.normalizeLon(Math.toDegrees(a))); 372 372 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
r9900 r10000 114 114 } 115 115 116 private List<GeneralPath> createPolygons(List<Multipolygon.PolyData> joinedWays) {116 private static List<GeneralPath> createPolygons(List<Multipolygon.PolyData> joinedWays) { 117 117 List<GeneralPath> result = new ArrayList<>(); 118 118 for (Multipolygon.PolyData way : joinedWays) { -
trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
r9706 r10000 455 455 } 456 456 457 private String getRelationName(IRelation relation) {458 String nameTag = null;457 private static String getRelationName(IRelation relation) { 458 String nameTag; 459 459 for (String n : getNamingtagsForRelations()) { 460 460 nameTag = getNameTagValue(relation, n); -
trunk/src/org/openstreetmap/josm/gui/MapMover.java
r9824 r10000 22 22 23 23 import org.openstreetmap.gui.jmapviewer.JMapViewer; 24 25 24 import org.openstreetmap.josm.Main; 26 25 import org.openstreetmap.josm.actions.mapmode.SelectAction; 26 import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent; 27 import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener; 27 28 import org.openstreetmap.josm.data.coor.EastNorth; 28 29 import org.openstreetmap.josm.data.preferences.BooleanProperty; 29 import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent;30 import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;31 30 import org.openstreetmap.josm.tools.Destroyable; 32 31 import org.openstreetmap.josm.tools.Shortcut; … … 58 57 } 59 58 60 private void updateJMapViewer() {59 private static void updateJMapViewer() { 61 60 JMapViewer.zoomReverseWheel = MapMover.PROP_ZOOM_REVERSE_WHEEL.get(); 62 61 } -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java
r9990 r10000 49 49 * @since 1631 50 50 */ 51 public abstract class ListMerger<T extends PrimitiveId> extends JPanel implements PropertyChangeListener, Observer {51 public abstract class ListMerger<T extends PrimitiveId> extends JPanel implements PropertyChangeListener, Observer, IConflictResolver { 52 52 protected OsmPrimitivesTable myEntriesTable; 53 53 protected OsmPrimitivesTable mergedEntriesTable; -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMerger.java
r8510 r10000 8 8 import org.openstreetmap.josm.data.osm.OsmPrimitive; 9 9 import org.openstreetmap.josm.data.osm.Way; 10 import org.openstreetmap.josm.gui.conflict.pair.IConflictResolver;11 10 import org.openstreetmap.josm.gui.conflict.pair.ListMerger; 12 11 … … 15 14 * @since 1622 16 15 */ 17 public class NodeListMerger extends ListMerger<Node> implements IConflictResolver{16 public class NodeListMerger extends ListMerger<Node> { 18 17 19 18 /** -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMerger.java
r8510 r10000 8 8 import org.openstreetmap.josm.data.osm.Relation; 9 9 import org.openstreetmap.josm.data.osm.RelationMember; 10 import org.openstreetmap.josm.gui.conflict.pair.IConflictResolver;11 10 import org.openstreetmap.josm.gui.conflict.pair.ListMerger; 12 11 … … 15 14 * @since 1631 16 15 */ 17 public class RelationMemberMerger extends ListMerger<RelationMember> implements IConflictResolver{16 public class RelationMemberMerger extends ListMerger<RelationMember> { 18 17 19 18 /** -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
r9981 r10000 315 315 } 316 316 317 private void warnAboutParseError(SearchCompiler.ParseError parseError) {317 private static void warnAboutParseError(SearchCompiler.ParseError parseError) { 318 318 Main.warn(parseError); 319 319 JOptionPane.showMessageDialog( -
trunk/src/org/openstreetmap/josm/gui/layer/AlignImageryPanel.java
r9576 r10000 61 61 Main.map.removeTopPanel(AlignImageryPanel.class); 62 62 if (doNotShowAgain.isSelected()) { 63 showAgain.put( false);63 showAgain.put(Boolean.FALSE); 64 64 } 65 65 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
r9975 r10000 53 53 } 54 54 55 private int getIndex(boolean selected) {55 private static int getIndex(boolean selected) { 56 56 return selected ? SELECTED : PLAIN; 57 57 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
r9854 r10000 294 294 * @return An arbitrary key this rule depends on or <code>null</code> if there is no such key. 295 295 */ 296 private String findAnyRequiredKey(List<Condition> conds) {296 private static String findAnyRequiredKey(List<Condition> conds) { 297 297 String key = null; 298 298 for (Condition c : conds) { -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
r9778 r10000 97 97 } 98 98 99 private void addSettingsSection(final JPanel p, String name, JPanel section) {99 private static void addSettingsSection(final JPanel p, String name, JPanel section) { 100 100 addSettingsSection(p, name, section, GBC.eol()); 101 101 } -
trunk/src/org/openstreetmap/josm/io/CertificateAmendment.java
r9997 r10000 106 106 } 107 107 if (certificateIsMissing(keyStore, cert)) { 108 Main.debug(tr("Adding certificate for TLS connections: {0}", cert.getSubjectX500Principal().getName())); 108 if (Main.isDebugEnabled()) { 109 Main.debug(tr("Adding certificate for TLS connections: {0}", cert.getSubjectX500Principal().getName())); 110 } 109 111 String alias = "josm:" + new File(CERT_AMEND[i]).getName(); 110 112 try { -
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r9353 r10000 859 859 * @throws OsmTransferException if the API response cannot be parsed 860 860 */ 861 private Note parseSingleNote(String xml) throws OsmTransferException {861 private static Note parseSingleNote(String xml) throws OsmTransferException { 862 862 try { 863 863 List<Note> newNotes = new NoteReader(xml).parse(); … … 865 865 return newNotes.get(0); 866 866 } 867 // Shouldn't ever execute. Server will either respond with an error (caught elsewhere) or one note867 // Shouldn't ever execute. Server will either respond with an error (caught elsewhere) or one note 868 868 throw new OsmTransferException(tr("Note upload failed")); 869 869 } catch (SAXException | IOException e) { -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
r9231 r10000 266 266 * If the error can not be written 267 267 */ 268 private void sendError(Writer out) throws IOException {268 private static void sendError(Writer out) throws IOException { 269 269 sendHeader(out, "500 Internal Server Error", "text/html", true); 270 270 out.write("<HTML>\r\n"); … … 285 285 * If the error can not be written 286 286 */ 287 private void sendNotImplemented(Writer out) throws IOException {287 private static void sendNotImplemented(Writer out) throws IOException { 288 288 sendHeader(out, "501 Not Implemented", "text/html", true); 289 289 out.write("<HTML>\r\n"); … … 306 306 * If the error can not be written 307 307 */ 308 private void sendForbidden(Writer out, String help) throws IOException {308 private static void sendForbidden(Writer out, String help) throws IOException { 309 309 sendHeader(out, "403 Forbidden", "text/html", true); 310 310 out.write("<HTML>\r\n"); … … 330 330 * If the error can not be written 331 331 */ 332 private void sendBadRequest(Writer out, String help) throws IOException {332 private static void sendBadRequest(Writer out, String help) throws IOException { 333 333 sendHeader(out, "400 Bad Request", "text/html", true); 334 334 out.write("<HTML>\r\n");
Note:
See TracChangeset
for help on using the changeset viewer.