Changeset 33619 in osm for applications/editors
- Timestamp:
- 2017-09-17T19:32:09+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/pt_assistant
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pt_assistant/build.xml
r33594 r33619 5 5 <property name="commit.message" value="Commit message"/> 6 6 <!-- enter the *lowest JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="1282 3"/>7 <property name="plugin.main.version" value="12828"/> 8 8 9 9 <property name="plugin.author" value="Darya Golovko darya0705@gmail.com"/> -
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/AddStopPositionAction.java
r33571 r33619 17 17 18 18 import org.openstreetmap.josm.actions.JoinNodeWayAction; 19 import org.openstreetmap.josm.actions.SplitWayAction;20 import org.openstreetmap.josm.actions.SplitWayAction.SplitWayResult;21 19 import org.openstreetmap.josm.actions.mapmode.MapMode; 22 20 import org.openstreetmap.josm.command.AddCommand; … … 24 22 import org.openstreetmap.josm.command.Command; 25 23 import org.openstreetmap.josm.command.SequenceCommand; 24 import org.openstreetmap.josm.command.SplitWayCommand; 26 25 import org.openstreetmap.josm.data.osm.Node; 27 26 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 136 135 137 136 if (newNode) { 138 MainApplication.undoRedo.add(new AddCommand( newStopPos));137 MainApplication.undoRedo.add(new AddCommand(getLayerManager().getEditDataSet(), newStopPos)); 139 138 } else { 140 139 MainApplication.undoRedo.add(new ChangeCommand(n, newStopPos)); … … 159 158 return; 160 159 161 SplitWay Result result = SplitWayAction.split(getLayerManager().getEditLayer(),160 SplitWayCommand result = SplitWayCommand.split( 162 161 affected, Collections.singletonList(newStopPos), Collections.emptyList()); 163 162 if (result == null) //if the way is already split, return 164 163 return; 165 MainApplication.undoRedo.add(result .getCommand());164 MainApplication.undoRedo.add(result); 166 165 167 166 List<Command> cmds = new ArrayList<>(); -
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/CreatePlatformNodeAction.java
r33571 r33619 18 18 import org.openstreetmap.josm.command.DeleteCommand; 19 19 import org.openstreetmap.josm.command.SequenceCommand; 20 import org.openstreetmap.josm.data.osm.DataSet; 20 21 import org.openstreetmap.josm.data.osm.Node; 21 22 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 79 80 SortedSet<String> refs = new TreeSet<>(); 80 81 81 MainApplication.undoRedo.add(new AddCommand(dummy1)); 82 MainApplication.undoRedo.add(new AddCommand(dummy2)); 83 MainApplication.undoRedo.add(new AddCommand(dummy3)); 82 DataSet ds = getLayerManager().getEditDataSet(); 83 MainApplication.undoRedo.add(new AddCommand(ds, dummy1)); 84 MainApplication.undoRedo.add(new AddCommand(ds, dummy2)); 85 MainApplication.undoRedo.add(new AddCommand(ds, dummy3)); 84 86 85 87 refs.addAll(populateMap(stopPositionNode)); -
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/SplitRoundaboutAction.java
r33571 r33619 21 21 import org.openstreetmap.josm.actions.AlignInCircleAction; 22 22 import org.openstreetmap.josm.actions.JosmAction; 23 import org.openstreetmap.josm.actions.SplitWayAction;24 import org.openstreetmap.josm.actions.SplitWayAction.SplitWayResult;25 23 import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask; 26 24 import org.openstreetmap.josm.actions.relation.DownloadSelectedIncompleteMembersAction; … … 28 26 import org.openstreetmap.josm.command.Command; 29 27 import org.openstreetmap.josm.command.SequenceCommand; 28 import org.openstreetmap.josm.command.SplitWayCommand; 30 29 import org.openstreetmap.josm.data.Bounds; 31 30 import org.openstreetmap.josm.data.osm.BBox; … … 111 110 //split the roundabout on the designed nodes 112 111 List<Node> splitNodes = getSplitNodes(roundabout); 113 SplitWay Result result = SplitWayAction.split(getLayerManager().getEditLayer(),112 SplitWayCommand result = SplitWayCommand.split( 114 113 roundabout, splitNodes, Collections.emptyList()); 115 MainApplication.undoRedo.add(result .getCommand());114 MainApplication.undoRedo.add(result); 116 115 Collection<Way> splitWays = result.getNewWays(); 117 116 splitWays.add(result.getOriginalWay()); -
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/Checker.java
r33571 r33619 8 8 import javax.swing.SwingUtilities; 9 9 10 import org.openstreetmap.josm.Main; 10 11 import org.openstreetmap.josm.actions.AutoScaleAction; 11 12 import org.openstreetmap.josm.command.Command; … … 144 145 } 145 146 146 SelectCommand command = new SelectCommand( primitivesToZoom);147 SelectCommand command = new SelectCommand(Main.main.getEditDataSet(), primitivesToZoom); 147 148 148 149 List<OsmDataLayer> listOfLayers = MainApplication.getLayerManager().getLayersOfType(OsmDataLayer.class); -
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/PTAssistantValidatorTest.java
r33503 r33619 516 516 primitivesToSelect.add((OsmPrimitive) obj); 517 517 } 518 SelectCommand selectCommand = new SelectCommand(primitivesToSelect); 519 SwingUtilities.invokeLater(new Runnable() { 520 @Override 521 public void run() { 522 selectCommand.executeCommand(); 523 } 524 }); 518 SelectCommand selectCommand = new SelectCommand(Main.main.getEditDataSet(), primitivesToSelect); 519 SwingUtilities.invokeLater(() -> selectCommand.executeCommand()); 525 520 } 526 521
Note:
See TracChangeset
for help on using the changeset viewer.