Ignore:
Timestamp:
2017-04-14T23:33:58+02:00 (8 years ago)
Author:
donvip
Message:

update to JOSM 11713

Location:
applications/editors/josm/plugins/CommandLine
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/CommandLine/build.xml

    r32680 r33238  
    44    <property name="commit.message" value="JOSM/CommandLine: fix exception after JOSM update"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="10580"/>
     6    <property name="plugin.main.version" value="11713"/>
    77
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/CommandLine/src/CommandLine/AbstractOsmAction.java

    r33026 r33238  
    1515import org.openstreetmap.josm.data.osm.DataSet;
    1616import org.openstreetmap.josm.data.osm.OsmPrimitive;
    17 import org.openstreetmap.josm.gui.MapFrame;
    1817import org.openstreetmap.josm.tools.ImageProvider;
    1918
     
    2726    private boolean isCtrlDown;
    2827
    29     protected AbstractOsmAction(MapFrame mapFrame, CommandLine parentPlugin, String activeCursorIcon) {
    30         super(null, "addsegment.png", null, mapFrame, ImageProvider.getCursor("normal", "selection"));
     28    protected AbstractOsmAction(CommandLine parentPlugin, String activeCursorIcon) {
     29        super(null, "addsegment.png", null, ImageProvider.getCursor("normal", "selection"));
    3130        this.parentPlugin = parentPlugin;
    3231        cursorNormal = ImageProvider.getCursor("normal", "selection");
  • applications/editors/josm/plugins/CommandLine/src/CommandLine/AnyAction.java

    r33026 r33238  
    66import org.openstreetmap.josm.Main;
    77import org.openstreetmap.josm.data.osm.OsmPrimitive;
    8 import org.openstreetmap.josm.gui.MapFrame;
    98
    109public class AnyAction extends AbstractOsmAction<OsmPrimitive> {
    1110
    12     public AnyAction(MapFrame mapFrame, CommandLine parentPlugin) {
    13         super(mapFrame, parentPlugin, "joinnode");
     11    public AnyAction(CommandLine parentPlugin) {
     12        super(parentPlugin, "joinnode");
    1413    }
    1514
  • applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java

    r33174 r33238  
    239239            switch (currentType) {
    240240            case POINT:
    241                 action = new PointAction(currentMapFrame, this);
     241                action = new PointAction(this);
    242242                break;
    243243            case WAY:
    244                 action = new WayAction(currentMapFrame, this);
     244                action = new WayAction(this);
    245245                break;
    246246            case NODE:
    247                 action = new NodeAction(currentMapFrame, this);
     247                action = new NodeAction(this);
    248248                break;
    249249            case RELATION:
    250                 action = new RelationAction(currentMapFrame, this);
     250                action = new RelationAction(this);
    251251                break;
    252252            case ANY:
    253                 action = new AnyAction(currentMapFrame, this);
     253                action = new AnyAction(this);
    254254                break;
    255255            case LENGTH:
    256                 action = new LengthAction(currentMapFrame, this);
     256                action = new LengthAction(this);
    257257                break;
    258258            case USERNAME:
    259259                loadParameter(Main.pref.get("osm-server.username", null), true);
    260                 action = new DummyAction(currentMapFrame, this);
     260                action = new DummyAction(this);
    261261                break;
    262262            case IMAGERYURL:
     
    278278                    loadParameter(url.isEmpty() ? info.getImageryType().getTypeString() : url, true);
    279279                }
    280                 action = new DummyAction(currentMapFrame, this);
     280                action = new DummyAction(this);
    281281                break;
    282282            case IMAGERYOFFSET:
     
    294294                }
    295295                loadParameter((String.valueOf(((ImageryLayer) olayer).getDx()) + "," + String.valueOf(((ImageryLayer) olayer).getDy())), true);
    296                 action = new DummyAction(currentMapFrame, this);
     296                action = new DummyAction(this);
    297297                break;
    298298            default:
    299                 action = new DummyAction(currentMapFrame, this);
     299                action = new DummyAction(this);
    300300                break;
    301301            }
  • applications/editors/josm/plugins/CommandLine/src/CommandLine/DummyAction.java

    r32779 r33238  
    88import org.openstreetmap.josm.Main;
    99import org.openstreetmap.josm.actions.mapmode.MapMode;
    10 import org.openstreetmap.josm.gui.MapFrame;
    1110import org.openstreetmap.josm.tools.ImageProvider;
    1211
     
    1413    private final CommandLine parentPlugin;
    1514
    16     public DummyAction(MapFrame mapFrame, CommandLine parentPlugin) {
    17             super(null, "addsegment.png", null, mapFrame, ImageProvider.getCursor("normal", null));
     15    public DummyAction(CommandLine parentPlugin) {
     16            super(null, "addsegment.png", null, ImageProvider.getCursor("normal", null));
    1817            this.parentPlugin = parentPlugin;
    1918    }
  • applications/editors/josm/plugins/CommandLine/src/CommandLine/LengthAction.java

    r32779 r33238  
    2424import org.openstreetmap.josm.data.osm.Node;
    2525import org.openstreetmap.josm.data.osm.OsmPrimitive;
    26 import org.openstreetmap.josm.gui.MapFrame;
     26import org.openstreetmap.josm.data.preferences.ColorProperty;
    2727import org.openstreetmap.josm.gui.MapView;
    2828import org.openstreetmap.josm.gui.layer.Layer;
     
    4545    private boolean drawing;
    4646
    47     public LengthAction(MapFrame mapFrame, CommandLine parentPlugin) {
    48         super(null, "addsegment.png", null, mapFrame, ImageProvider.getCursor("crosshair", null));
     47    public LengthAction(CommandLine parentPlugin) {
     48        super(null, "addsegment.png", null, ImageProvider.getCursor("crosshair", null));
    4949        this.parentPlugin = parentPlugin;
    50         selectedColor = Main.pref.getColor(marktr("selected"), Color.red);
     50        selectedColor = new ColorProperty(marktr("selected"), Color.red).get();
    5151        cursorCrosshair = ImageProvider.getCursor("crosshair", null);
    5252        cursorJoinNode = ImageProvider.getCursor("crosshair", "joinnode");
  • applications/editors/josm/plugins/CommandLine/src/CommandLine/NodeAction.java

    r33026 r33238  
    77import org.openstreetmap.josm.data.osm.Node;
    88import org.openstreetmap.josm.data.osm.OsmPrimitive;
    9 import org.openstreetmap.josm.gui.MapFrame;
    109
    1110public class NodeAction extends AbstractOsmAction<Node> {
    1211
    13     public NodeAction(MapFrame mapFrame, CommandLine parentPlugin) {
    14         super(mapFrame, parentPlugin, "joinnode");
     12    public NodeAction(CommandLine parentPlugin) {
     13        super(parentPlugin, "joinnode");
    1514    }
    1615
  • applications/editors/josm/plugins/CommandLine/src/CommandLine/PointAction.java

    r32779 r33238  
    2121import org.openstreetmap.josm.data.osm.Node;
    2222import org.openstreetmap.josm.data.osm.OsmPrimitive;
    23 import org.openstreetmap.josm.gui.MapFrame;
    2423import org.openstreetmap.josm.tools.ImageProvider;
    2524
     
    3433    private boolean isCtrlDown;
    3534
    36     public PointAction(MapFrame mapFrame, CommandLine parentPlugin) {
    37         super(null, "addsegment.png", null, mapFrame, ImageProvider.getCursor("crosshair", null));
     35    public PointAction(CommandLine parentPlugin) {
     36        super(null, "addsegment.png", null, ImageProvider.getCursor("crosshair", null));
    3837        this.parentPlugin = parentPlugin;
    3938        cursorCrosshair = ImageProvider.getCursor("crosshair", null);
  • applications/editors/josm/plugins/CommandLine/src/CommandLine/RelationAction.java

    r32779 r33238  
    88import org.openstreetmap.josm.Main;
    99import org.openstreetmap.josm.actions.mapmode.MapMode;
    10 import org.openstreetmap.josm.gui.MapFrame;
    1110import org.openstreetmap.josm.tools.ImageProvider;
    1211
     
    1413    private final CommandLine parentPlugin;
    1514
    16     public RelationAction(MapFrame mapFrame, CommandLine parentPlugin) {
    17         super(null, "addsegment.png", null, mapFrame, ImageProvider.getCursor("normal", null));
     15    public RelationAction(CommandLine parentPlugin) {
     16        super(null, "addsegment.png", null, ImageProvider.getCursor("normal", null));
    1817        this.parentPlugin = parentPlugin;
    1918    }
  • applications/editors/josm/plugins/CommandLine/src/CommandLine/WayAction.java

    r33026 r33238  
    77import org.openstreetmap.josm.data.osm.OsmPrimitive;
    88import org.openstreetmap.josm.data.osm.Way;
    9 import org.openstreetmap.josm.gui.MapFrame;
    109
    1110public class WayAction extends AbstractOsmAction<Way> {
    1211
    13     public WayAction(MapFrame mapFrame, CommandLine parentPlugin) {
    14         super(mapFrame, parentPlugin, "joinway");
     12    public WayAction(CommandLine parentPlugin) {
     13        super(parentPlugin, "joinway");
    1514    }
    1615
Note: See TracChangeset for help on using the changeset viewer.