Changeset 33024 in osm for applications/editors/josm


Ignore:
Timestamp:
2016-10-02T17:21:33+02:00 (8 years ago)
Author:
donvip
Message:

checkstyle

Location:
applications/editors/josm/plugins/dataimport
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/dataimport/.project

    r32286 r33024  
    1717                        </arguments>
    1818                </buildCommand>
     19                <buildCommand>
     20                        <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
     21                        <arguments>
     22                        </arguments>
     23                </buildCommand>
    1924        </buildSpec>
    2025        <natures>
    2126                <nature>org.eclipse.jdt.core.javanature</nature>
     27                <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
    2228        </natures>
    2329</projectDescription>
  • applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/DataImportPlugin.java

    r32287 r33024  
    1 /**
    2  * This plugin leverages JOSM to import files.
    3  */
     1// License: GPL. For details, see LICENSE file.
    42package org.openstreetmap.josm.plugins.dataimport;
    53
     
    2119     * @param info plugin information
    2220     */
    23     public DataImportPlugin(PluginInformation info) throws IOException{
     21    public DataImportPlugin(PluginInformation info) throws IOException {
    2422        super(info);
    2523
  • applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java

    r33009 r33024  
    1 /**
    2  *
    3  */
     1// License: GPL. For details, see LICENSE file.
    42package org.openstreetmap.josm.plugins.dataimport.io;
    53
     
    3634
    3735    public TangoGPS() {
    38         super(new ExtensionFileFilter("log", "log",tr("TangoGPS Files (*.log)")));
     36        super(new ExtensionFileFilter("log", "log", tr("TangoGPS Files (*.log)")));
    3937    }
    4038
     
    4341     * This function imports data from file and adds trackpoints to a layer.
    4442     * Read a log file from TangoGPS. These are simple text files in the
    45      * form: <lat>,<lon>,<elevation>,<speed>,<course>,<hdop>,<datetime>
     43     * form: {@code <lat>,<lon>,<elevation>,<speed>,<course>,<hdop>,<datetime>}
    4644     */
    4745    @Override
     
    7674            }
    7775            failure = failure - imported;
    78             if(imported > 0) {
     76            if (imported > 0) {
    7977                GpxData data = new GpxData();
    8078                data.tracks.add(new ImmutableGpxTrack(Collections.singleton(currentTrackSeg), Collections.<String, Object>emptyMap()));
     
    9088                }
    9189            }
    92             showInfobox(imported,failure);
     90            showInfobox(imported, failure);
    9391        }
    9492    }
     
    104102    }
    105103
    106     private void showInfobox(int success,int failure) {
     104    private void showInfobox(int success, int failure) {
    107105        String msg = tr("Coordinates imported: ") + success + " " + tr("Format errors: ") + failure + "\n";
    108106        if (success > 0) {
  • applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java

    r32484 r33024  
    4747 * The Garmin TCX Schema file can be downloaded from: <a
    4848 * href="http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd">http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd</a>
    49  * The command used to generate the code is: <code>
    50  * xjc.bat -p org.openstreetmap.josm.io.tcx TrainingCenterDatabasev2.xsd -d <path to the src folder of JOSM>
    51  * </code>
     49 * The command used to generate the code is:
     50 * {@code xjc.bat -p org.openstreetmap.josm.io.tcx TrainingCenterDatabasev2.xsd -d <path to the src folder of JOSM>}
    5251 * <p>
    5352 * Note: if you get an exception that JAXB 2.1 is not supported on your system, you will have to add the jaxb-api.jar
    5453 * to the endorsed directory (create it if necessary) of your JRE. Usually it is something like this:
    55  * \<program files>\Java\jre<java version>\lib\endorsed
     54 * {@code \<program files>\Java\jre<java version>\lib\endorsed}
    5655 *
    57  * @author adrian <as@nitegate.de>
     56 * @author adrian &lt;as@nitegate.de&gt;
    5857 *
    5958 */
     
    6463    private GpxData gpxData;
    6564
    66 
    6765    public Tcx() {
    68         super(new ExtensionFileFilter("tcx", "tcx",tr("TCX Files (*.tcx)")));
    69     }
    70 
    71     /**
    72      * @param tcxFile
    73      */
     66        super(new ExtensionFileFilter("tcx", "tcx", tr("TCX Files (*.tcx)")));
     67    }
     68
    7469    @Override
    7570    public void importData(File tcxFile, ProgressMonitor progressMonitor) throws IOException {
     
    8075        GpxLayer gpxLayer = new GpxLayer(gpxData, tcxFile.getName());
    8176        Main.getLayerManager().addLayer(gpxLayer);
    82         if (Main.pref.getBoolean("marker.makeautomarkers", true))
    83         {
     77        if (Main.pref.getBoolean("marker.makeautomarkers", true)) {
    8478            MarkerLayer ml = new MarkerLayer(gpxData, tr("Markers from {0}", tcxFile.getName()), tcxFile, gpxLayer);
    85             if (ml.data.size() > 0)
    86             {
     79            if (ml.data.size() > 0) {
    8780                Main.getLayerManager().addLayer(ml);
    8881            }
     
    9891                    .newInstance(TrainingCenterDatabaseT.class);
    9992            Unmarshaller unmarshaller = jc.createUnmarshaller();
    100             JAXBElement<TrainingCenterDatabaseT> element = (JAXBElement<TrainingCenterDatabaseT>)unmarshaller
     93            JAXBElement<TrainingCenterDatabaseT> element = (JAXBElement<TrainingCenterDatabaseT>) unmarshaller
    10194                    .unmarshal(tcxFile);
    10295
     
    145138    }
    146139
    147     /**
    148      * @param tcd
    149      */
    150140    private void parseDataFromActivities(TrainingCenterDatabaseT tcd) {
    151141        int lap = 0;
     
    188178    }
    189179
    190     /**
    191      * @param tcd
    192      */
    193180    private void parseDataFromCourses(TrainingCenterDatabaseT tcd) {
    194181        if ((tcd.getCourses() != null)
Note: See TracChangeset for help on using the changeset viewer.