Changeset 16069 in josm
- Timestamp:
- 2020-03-08T09:25:04+01:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java
r15786 r16069 90 90 } 91 91 92 Logging.info( tr("{0} completed in {1}", actionName, stopwatch));92 Logging.info(stopwatch.toString(String.valueOf(actionName))); 93 93 }); 94 94 } … … 114 114 if (layerMerged) { 115 115 getLayerManager().setActiveLayer(targetLayer); 116 Logging.info( tr("{0} completed in {1}", actionName, stopwatch));116 Logging.info(stopwatch.toString(String.valueOf(actionName))); 117 117 } 118 118 }); -
trunk/src/org/openstreetmap/josm/data/osm/DatasetConsistencyTest.java
r16068 r16069 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.osm; 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 3 6 4 import java.io.PrintWriter; … … 189 187 StackTraceElement item = Thread.currentThread().getStackTrace()[2]; 190 188 String operation = getClass().getSimpleName() + '.' + item.getMethodName(); 191 Logging.debug(tr("{0} completed in {1}", 192 operation, stopwatch)); 189 Logging.debug(stopwatch.toString(operation)); 193 190 } 194 191 } -
trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
r15755 r16069 608 608 public static synchronized void initializeTests() { 609 609 if (!testsInitialized) { 610 Logging.debug("Initializing validator tests"); 610 final String message = "Initializing validator tests"; 611 Logging.debug(message); 611 612 final Stopwatch stopwatch = Stopwatch.createStarted(); 612 613 initializeTests(getTests()); 613 614 testsInitialized = true; 614 Logging.debug( "Initializing validator tests completed in {0}", stopwatch);615 Logging.debug(stopwatch.toString("Initializing validator tests")); 615 616 } 616 617 } -
trunk/src/org/openstreetmap/josm/data/validation/Test.java
r16068 r16069 198 198 progressMonitor = null; 199 199 if (stopwatch.elapsed() > 0) { 200 Logging.debug( tr("{0} completed in {1}", getName(), stopwatch));200 Logging.debug(stopwatch.toString(getName())); 201 201 } 202 202 } -
trunk/src/org/openstreetmap/josm/gui/SplashScreen.java
r15755 r16069 164 164 } 165 165 if (stopwatch.elapsed() >= 0) { 166 Logging.debug(stopwatch.toString(name)); 166 167 duration = tr(" ({0})", stopwatch); 167 168 } … … 299 300 taskOptional.ifPresent(task -> { 300 301 ((MeasurableTask) task).finish(); 301 if (Logging.isDebugEnabled()) {302 Logging.debug(tr("{0} completed in {1}", title, ((MeasurableTask) task).duration));303 }304 302 listener.stateChanged(null); 305 303 }); -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
r15755 r16069 488 488 // show some debug info 489 489 if (Logging.isDebugEnabled() && !visibleSegments.isEmpty()) { 490 Logging.debug("gpxdraw::draw takes " + 491 stopwatch + 490 Logging.debug(stopwatch.toString("gpxdraw::draw") + 492 491 "(" + 493 492 "segments= " + visibleSegments.size() + -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r15902 r16069 308 308 } 309 309 if (Logging.isDebugEnabled() || !source.isValid()) { 310 String message = "Initializing map style " + source.url + " completed in " + stopwatch;310 String message = stopwatch.toString("Initializing map style " + source.url); 311 311 if (!source.isValid()) { 312 312 Logging.warn(message + " (" + source.getErrors().size() + " errors, " + source.getWarnings().size() + " warnings)"); -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReader.java
r15755 r16069 368 368 } 369 369 } 370 if (Logging.isDebugEnabled()) { 371 Logging.debug("Presets read in {0}", stopwatch); 372 } 370 Logging.debug(stopwatch.toString("Reading presets")); 373 371 return tp; 374 372 } -
trunk/src/org/openstreetmap/josm/tools/Stopwatch.java
r15755 r16069 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.tools; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 /** … … 44 46 return Utils.getDurationString(Math.max(0, elapsed())); 45 47 } 48 49 /** 50 * Formats the given task name and duration since start as i18n string 51 * @param taskName the task name 52 * @return the task name and duration since start as i18n string 53 */ 54 public String toString(String taskName) { 55 return tr("{0} completed in {1}", taskName, toString()); 56 } 46 57 } -
trunk/src/org/openstreetmap/josm/tools/XmlUtils.java
r15755 r16069 87 87 Logging.debug("Starting DOM parsing of {0}", is); 88 88 Document result = newSafeDOMBuilder().parse(is); 89 Logging.debug( "DOM parsing done in {0}", stopwatch);89 Logging.debug(stopwatch.toString("DOM parsing")); 90 90 return result; 91 91 } … … 118 118 Logging.debug("Starting SAX parsing of {0} using {1}", is, dh); 119 119 newSafeSAXParser().parse(is, dh); 120 Logging.debug( "SAX parsing done in {0}", stopwatch);120 Logging.debug(stopwatch.toString("SAX parsing")); 121 121 } 122 122
Note:
See TracChangeset
for help on using the changeset viewer.