Ignore:
Timestamp:
2014-10-19T01:27:04+02:00 (12 years ago)
Author:
donvip
Message:

[josm_plugins] fix java 7 warnings / global usage of try-with-resource

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetPlugin.java

    r30737 r30738  
    11package iodb;
    22
     3import static org.openstreetmap.josm.tools.I18n.marktr;
     4
    35import java.awt.event.KeyEvent;
    4 import java.util.*;
     6import java.util.Collection;
     7import java.util.LinkedList;
     8
    59import javax.swing.JMenu;
     10
    611import org.openstreetmap.josm.Main;
    712import org.openstreetmap.josm.data.Version;
     13import org.openstreetmap.josm.gui.preferences.ToolbarPreferences;
    814import org.openstreetmap.josm.plugins.Plugin;
    915import org.openstreetmap.josm.plugins.PluginInformation;
    10 import static org.openstreetmap.josm.tools.I18n.marktr;
    1116
    1217/**
    1318 * A plugin to request and store imagery offsets in the centralized database.
    14  * 
     19 *
    1520 * @author Zverik
    1621 * @license WTFPL
     
    1924    private GetImageryOffsetAction getAction;
    2025    private StoreImageryOffsetAction storeAction;
    21    
     26
    2227    /**
    2328     * Add both actions to their own menu. This creates
     
    2833    public ImageryOffsetPlugin( PluginInformation info ) {
    2934        super(info);
    30        
     35
    3136        getAction = new GetImageryOffsetAction();
    3237        storeAction = new StoreImageryOffsetAction();
    33        
     38
    3439        // before 5803 imagery menu was constantly regenerated, erasing extra items
    3540        // before 5729 it was regenerated only when the imagery list was modified (also bad)
     
    4348        // an ugly hack to add this plugin to the toolbar
    4449        if( Main.pref.getBoolean("iodb.modify.toolbar", true) ) {
    45             Collection<String> toolbar = new LinkedList<>(Main.toolbar.getToolString());
     50            Collection<String> toolbar = new LinkedList<>(ToolbarPreferences.getToolString());
    4651            if( !toolbar.contains("getoffset") ) {
    4752                toolbar.add("getoffset");
Note: See TracChangeset for help on using the changeset viewer.