Changeset 31981 in osm for applications/editors
- Timestamp:
- 2016-01-13T01:18:14+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/NanoLog
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/NanoLog/.settings/org.eclipse.jdt.core.prefs
r30736 r31981 7 7 org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled 8 8 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 9 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 9 10 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 11 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 10 12 org.eclipse.jdt.core.compiler.compliance=1.7 13 org.eclipse.jdt.core.compiler.debug.lineNumber=generate 14 org.eclipse.jdt.core.compiler.debug.localVariable=generate 15 org.eclipse.jdt.core.compiler.debug.sourceFile=generate 11 16 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning 12 17 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error … … 40 45 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore 41 46 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled 42 org.eclipse.jdt.core.compiler.problem.missingSerialVersion= warning47 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore 43 48 org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore 44 49 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning … … 81 86 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled 82 87 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled 88 org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore 83 89 org.eclipse.jdt.core.compiler.problem.unusedImport=warning 84 90 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -
applications/editors/josm/plugins/NanoLog/build.xml
r31923 r31981 5 5 <property name="commit.message" value="NanoLog"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value=" 7299"/>7 <property name="plugin.main.version" value="9383"/> 8 8 <property name="plugin.author" value="Ilya Zverev"/> 9 9 <property name="plugin.class" value="nanolog.NanoLogPlugin"/> -
applications/editors/josm/plugins/NanoLog/src/nanolog/Correlator.java
r30836 r31981 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.text.ParseException;6 5 import java.util.ArrayList; 7 6 import java.util.Collections; … … 17 16 import org.openstreetmap.josm.data.gpx.GpxTrackSegment; 18 17 import org.openstreetmap.josm.data.gpx.WayPoint; 19 import org.openstreetmap.josm.tools. Geometry;20 import org.openstreetmap.josm.tools.date. PrimaryDateParser;18 import org.openstreetmap.josm.tools.UncheckedParseException; 19 import org.openstreetmap.josm.tools.date.DateUtils; 21 20 22 21 /** … … 33 32 public static long crudeMatch( List<NanoLogEntry> entries, GpxData data ) { 34 33 List<NanoLogEntry> sortedEntries = new ArrayList<>(entries); 35 PrimaryDateParser dateParser = new PrimaryDateParser();36 34 Collections.sort(sortedEntries); 37 35 long firstExifDate = sortedEntries.get(0).getTime().getTime(); … … 47 45 48 46 try { 49 firstGPXDate = dateParser.parse(curDateWpStr).getTime();47 firstGPXDate = DateUtils.fromString(curDateWpStr).getTime(); 50 48 break outer; 51 49 } catch( Exception e ) { … … 82 80 List<NanoLogEntry> sortedEntries = new ArrayList<>(entries); 83 81 //int ret = 0; 84 PrimaryDateParser dateParser = new PrimaryDateParser();85 82 Collections.sort(sortedEntries); 86 83 for( GpxTrack track : data.tracks ) { … … 94 91 if( curWpTimeStr != null ) { 95 92 try { 96 long curWpTime = dateParser.parse(curWpTimeStr).getTime() + offset;93 long curWpTime = DateUtils.fromString(curWpTimeStr).getTime() + offset; 97 94 /*ret +=*/ matchPoints(sortedEntries, prevWp, prevWpTime, curWp, curWpTime, offset); 98 95 … … 100 97 prevWpTime = curWpTime; 101 98 102 } catch( ParseException e ) { 99 } catch( UncheckedParseException e ) { 103 100 Main.error("Error while parsing date \"" + curWpTimeStr + '"'); 104 101 Main.error(e); … … 220 217 public static long getGpxDate( GpxData data, LatLon pos ) { 221 218 EastNorth en = Main.getProjection().latlon2eastNorth(pos); 222 PrimaryDateParser dateParser = new PrimaryDateParser();223 219 for( GpxTrack track : data.tracks ) { 224 220 for( GpxTrackSegment segment : track.getSegments() ) { … … 229 225 if( curWpTimeStr != null ) { 230 226 try { 231 long curWpTime = dateParser.parse(curWpTimeStr).getTime();227 long curWpTime = DateUtils.fromString(curWpTimeStr).getTime(); 232 228 if( prevWp != null ) { 233 229 EastNorth c1 = Main.getProjection().latlon2eastNorth(prevWp.getCoor()); … … 249 245 prevWp = curWp; 250 246 prevWpTime = curWpTime; 251 } catch( ParseException e ) { 247 } catch( UncheckedParseException e ) { 252 248 Main.error("Error while parsing date \"" + curWpTimeStr + '"'); 253 249 Main.error(e); -
applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogEntry.java
r30701 r31981 25 25 this.time = time; 26 26 this.message = message; 27 this.direction = direction;28 27 } 29 28 -
applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogLayer.java
r30738 r31981 62 62 selectedEntry = -1; 63 63 mouseListener = new NLLMouseAdapter(); 64 } 65 66 public void setupListeners() { 64 67 Main.map.mapView.addMouseListener(mouseListener); 65 68 Main.map.mapView.addMouseMotionListener(mouseListener); -
applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPlugin.java
r30491 r31981 48 48 NanoLogLayer layer = new NanoLogLayer(entries); 49 49 Main.main.addLayer(layer); 50 layer.setupListeners(); 50 51 } 51 52 } catch( IOException ex ) {
Note:
See TracChangeset
for help on using the changeset viewer.