Changeset 33238 in osm for applications/editors/josm/plugins
- Timestamp:
- 2017-04-14T23:33:58+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/CommandLine
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/CommandLine/build.xml
r32680 r33238 4 4 <property name="commit.message" value="JOSM/CommandLine: fix exception after JOSM update"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="1 0580"/>6 <property name="plugin.main.version" value="11713"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/CommandLine/src/CommandLine/AbstractOsmAction.java
r33026 r33238 15 15 import org.openstreetmap.josm.data.osm.DataSet; 16 16 import org.openstreetmap.josm.data.osm.OsmPrimitive; 17 import org.openstreetmap.josm.gui.MapFrame;18 17 import org.openstreetmap.josm.tools.ImageProvider; 19 18 … … 27 26 private boolean isCtrlDown; 28 27 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")); 31 30 this.parentPlugin = parentPlugin; 32 31 cursorNormal = ImageProvider.getCursor("normal", "selection"); -
applications/editors/josm/plugins/CommandLine/src/CommandLine/AnyAction.java
r33026 r33238 6 6 import org.openstreetmap.josm.Main; 7 7 import org.openstreetmap.josm.data.osm.OsmPrimitive; 8 import org.openstreetmap.josm.gui.MapFrame;9 8 10 9 public class AnyAction extends AbstractOsmAction<OsmPrimitive> { 11 10 12 public AnyAction( MapFrame mapFrame,CommandLine parentPlugin) {13 super( mapFrame,parentPlugin, "joinnode");11 public AnyAction(CommandLine parentPlugin) { 12 super(parentPlugin, "joinnode"); 14 13 } 15 14 -
applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java
r33174 r33238 239 239 switch (currentType) { 240 240 case POINT: 241 action = new PointAction( currentMapFrame,this);241 action = new PointAction(this); 242 242 break; 243 243 case WAY: 244 action = new WayAction( currentMapFrame,this);244 action = new WayAction(this); 245 245 break; 246 246 case NODE: 247 action = new NodeAction( currentMapFrame,this);247 action = new NodeAction(this); 248 248 break; 249 249 case RELATION: 250 action = new RelationAction( currentMapFrame,this);250 action = new RelationAction(this); 251 251 break; 252 252 case ANY: 253 action = new AnyAction( currentMapFrame,this);253 action = new AnyAction(this); 254 254 break; 255 255 case LENGTH: 256 action = new LengthAction( currentMapFrame,this);256 action = new LengthAction(this); 257 257 break; 258 258 case USERNAME: 259 259 loadParameter(Main.pref.get("osm-server.username", null), true); 260 action = new DummyAction( currentMapFrame,this);260 action = new DummyAction(this); 261 261 break; 262 262 case IMAGERYURL: … … 278 278 loadParameter(url.isEmpty() ? info.getImageryType().getTypeString() : url, true); 279 279 } 280 action = new DummyAction( currentMapFrame,this);280 action = new DummyAction(this); 281 281 break; 282 282 case IMAGERYOFFSET: … … 294 294 } 295 295 loadParameter((String.valueOf(((ImageryLayer) olayer).getDx()) + "," + String.valueOf(((ImageryLayer) olayer).getDy())), true); 296 action = new DummyAction( currentMapFrame,this);296 action = new DummyAction(this); 297 297 break; 298 298 default: 299 action = new DummyAction( currentMapFrame,this);299 action = new DummyAction(this); 300 300 break; 301 301 } -
applications/editors/josm/plugins/CommandLine/src/CommandLine/DummyAction.java
r32779 r33238 8 8 import org.openstreetmap.josm.Main; 9 9 import org.openstreetmap.josm.actions.mapmode.MapMode; 10 import org.openstreetmap.josm.gui.MapFrame;11 10 import org.openstreetmap.josm.tools.ImageProvider; 12 11 … … 14 13 private final CommandLine parentPlugin; 15 14 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)); 18 17 this.parentPlugin = parentPlugin; 19 18 } -
applications/editors/josm/plugins/CommandLine/src/CommandLine/LengthAction.java
r32779 r33238 24 24 import org.openstreetmap.josm.data.osm.Node; 25 25 import org.openstreetmap.josm.data.osm.OsmPrimitive; 26 import org.openstreetmap.josm. gui.MapFrame;26 import org.openstreetmap.josm.data.preferences.ColorProperty; 27 27 import org.openstreetmap.josm.gui.MapView; 28 28 import org.openstreetmap.josm.gui.layer.Layer; … … 45 45 private boolean drawing; 46 46 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)); 49 49 this.parentPlugin = parentPlugin; 50 selectedColor = Main.pref.getColor(marktr("selected"), Color.red);50 selectedColor = new ColorProperty(marktr("selected"), Color.red).get(); 51 51 cursorCrosshair = ImageProvider.getCursor("crosshair", null); 52 52 cursorJoinNode = ImageProvider.getCursor("crosshair", "joinnode"); -
applications/editors/josm/plugins/CommandLine/src/CommandLine/NodeAction.java
r33026 r33238 7 7 import org.openstreetmap.josm.data.osm.Node; 8 8 import org.openstreetmap.josm.data.osm.OsmPrimitive; 9 import org.openstreetmap.josm.gui.MapFrame;10 9 11 10 public class NodeAction extends AbstractOsmAction<Node> { 12 11 13 public NodeAction( MapFrame mapFrame,CommandLine parentPlugin) {14 super( mapFrame,parentPlugin, "joinnode");12 public NodeAction(CommandLine parentPlugin) { 13 super(parentPlugin, "joinnode"); 15 14 } 16 15 -
applications/editors/josm/plugins/CommandLine/src/CommandLine/PointAction.java
r32779 r33238 21 21 import org.openstreetmap.josm.data.osm.Node; 22 22 import org.openstreetmap.josm.data.osm.OsmPrimitive; 23 import org.openstreetmap.josm.gui.MapFrame;24 23 import org.openstreetmap.josm.tools.ImageProvider; 25 24 … … 34 33 private boolean isCtrlDown; 35 34 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)); 38 37 this.parentPlugin = parentPlugin; 39 38 cursorCrosshair = ImageProvider.getCursor("crosshair", null); -
applications/editors/josm/plugins/CommandLine/src/CommandLine/RelationAction.java
r32779 r33238 8 8 import org.openstreetmap.josm.Main; 9 9 import org.openstreetmap.josm.actions.mapmode.MapMode; 10 import org.openstreetmap.josm.gui.MapFrame;11 10 import org.openstreetmap.josm.tools.ImageProvider; 12 11 … … 14 13 private final CommandLine parentPlugin; 15 14 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)); 18 17 this.parentPlugin = parentPlugin; 19 18 } -
applications/editors/josm/plugins/CommandLine/src/CommandLine/WayAction.java
r33026 r33238 7 7 import org.openstreetmap.josm.data.osm.OsmPrimitive; 8 8 import org.openstreetmap.josm.data.osm.Way; 9 import org.openstreetmap.josm.gui.MapFrame;10 9 11 10 public class WayAction extends AbstractOsmAction<Way> { 12 11 13 public WayAction( MapFrame mapFrame,CommandLine parentPlugin) {14 super( mapFrame,parentPlugin, "joinway");12 public WayAction(CommandLine parentPlugin) { 13 super(parentPlugin, "joinway"); 15 14 } 16 15
Note:
See TracChangeset
for help on using the changeset viewer.