Changeset 30733 in osm


Ignore:
Timestamp:
2014-10-18T16:33:42+02:00 (10 years ago)
Author:
donvip
Message:

[josm_epci-fr] fix sonar issues

Location:
applications/editors/josm/plugins/epci-fr
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/epci-fr/.project

    r26960 r30733  
    1313        </buildSpec>
    1414        <natures>
     15                <nature>org.sonar.ide.eclipse.core.sonarNature</nature>
    1516                <nature>org.eclipse.jdt.core.javanature</nature>
    1617        </natures>
  • applications/editors/josm/plugins/epci-fr/build.xml

    r30416 r30733  
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    66    <property name="plugin.main.version" value="7001"/>
    7        
     7   
    88    <!-- Configure these properties (replace "..." accordingly).
    99         See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
  • applications/editors/josm/plugins/epci-fr/src/org/openstreetmap/josm/plugins/fr/epci/EpciNameFormatter.java

    r26913 r30733  
    1111 */
    1212public class EpciNameFormatter implements NameFormatterHook {
    13        
    14         @Override
    15         public String checkRelationTypeName(IRelation relation, String defaultName) {
     13
     14    @Override
     15    public String checkRelationTypeName(IRelation relation, String defaultName) {
    1616        if (relation == null) return null;
    17                 String local_authority_FR = relation.get("local_authority:FR");
    18         if (local_authority_FR != null) {
    19                 return (defaultName != null ? defaultName : "") +
    20                         "["+(local_authority_FR.equals("metropole") ? "MP" : local_authority_FR)+"]";
     17        String localAuthorityFR = relation.get("local_authority:FR");
     18        if (localAuthorityFR != null) {
     19            return (defaultName != null ? defaultName : "") +
     20                    "["+("metropole".equals(localAuthorityFR) ? "MP" : localAuthorityFR)+"]";
    2121        } else {
    22                 return null;
     22            return null;
    2323        }
    24         }
     24    }
    2525
    26         @Override
    27         public String checkFormat(INode node, String defaultName) {
    28                 return null;
    29         }
     26    @Override
     27    public String checkFormat(INode node, String defaultName) {
     28        return null;
     29    }
    3030
    31         @Override
    32         public String checkFormat(IWay node, String defaultName) {
    33                 return null;
    34         }
     31    @Override
     32    public String checkFormat(IWay node, String defaultName) {
     33        return null;
     34    }
    3535
    36         @Override
    37         public String checkFormat(IRelation node, String defaultName) {
    38                 return null;
    39         }
     36    @Override
     37    public String checkFormat(IRelation node, String defaultName) {
     38        return null;
     39    }
    4040}
  • applications/editors/josm/plugins/epci-fr/src/org/openstreetmap/josm/plugins/fr/epci/EpciPlugin.java

    r26913 r30733  
    1515public class EpciPlugin extends Plugin {
    1616
    17         /**
    18         * @param info
    19         */
    20         public EpciPlugin(PluginInformation info) {
    21                 super(info);
    22                 DefaultNameFormatter.registerFormatHook(new EpciNameFormatter());
    23         }
     17    /**
     18    * @param info
     19    */
     20    public EpciPlugin(PluginInformation info) {
     21        super(info);
     22        DefaultNameFormatter.registerFormatHook(new EpciNameFormatter());
     23    }
    2424}
Note: See TracChangeset for help on using the changeset viewer.