Changeset 32553 in osm for applications/editors/josm


Ignore:
Timestamp:
2016-07-04T13:19:34+02:00 (8 years ago)
Author:
donvip
Message:

checkstyle

Location:
applications/editors/josm/plugins/no_more_mapping
Files:
6 added
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/no_more_mapping/src/nomore/NoMorePlugin.java

    r29479 r32553  
     1// License: WTFPL. For details, see LICENSE file.
    12package nomore;
    23
     4import static org.openstreetmap.josm.tools.I18n.tr;
     5
     6import java.io.IOException;
    37import java.util.Date;
     8
    49import javax.swing.JOptionPane;
     10
    511import org.openstreetmap.josm.Main;
    612import org.openstreetmap.josm.plugins.Plugin;
    713import org.openstreetmap.josm.plugins.PluginInformation;
    8 import static org.openstreetmap.josm.tools.I18n.tr;
    914
    1015/**
     
    1520public class NoMorePlugin extends Plugin {
    1621
     22    /**
     23     * Constructs a new {@code NoMorePlugin}.
     24     * @param info plugin information
     25     */
    1726    public NoMorePlugin(PluginInformation info) {
    1827        super(info);
     
    2332        boolean sameHash = Main.pref.getLong("nomoremapping.hash", 0) == lastHash;
    2433        long today = new Date().getTime() / 1000;
    25         if( startDate == 0 || !sameHash ) {
     34        if (startDate == 0 || !sameHash) {
    2635            startDate = today;
    2736            Main.pref.putLong("nomoremapping.date", startDate);
     
    3039        long days = Math.max(today - startDate, 0) / (60*60*24);
    3140        String message;
    32         if( days == 0 )
     41        if (days == 0)
    3342            message = "Make it one!";
    34         else if( days < 7 )
     43        else if (days < 7)
    3544            message = "Keep going!";
    36         else if( days < 31 )
     45        else if (days < 31)
    3746            message = "You're good. Keep on!";
    3847        else
     
    4251        try {
    4352             prefs = Main.pref.getPreferenceFile().getCanonicalPath();
    44         } catch( Exception e ) {
     53        } catch (IOException e) {
    4554            prefs = Main.pref.getPreferenceFile().getAbsolutePath();
    4655        }
Note: See TracChangeset for help on using the changeset viewer.