Changeset 33780 in osm for applications/editors/josm/plugins/turnrestrictions
- Timestamp:
- 2017-11-05T19:31:50+01:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/turnrestrictions
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/turnrestrictions/build.xml
r33537 r33780 4 4 <property name="commit.message" value="Adapt to JOSM core change (DefaultNameFormatter)"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="12 663"/>6 <property name="plugin.main.version" value="12859"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/MemberRoleCellEditor.java
r32519 r33780 8 8 import javax.swing.table.TableCellEditor; 9 9 10 import org.openstreetmap.josm.data.tagging.ac.AutoCompletionItem; 11 import org.openstreetmap.josm.data.tagging.ac.AutoCompletionPriority; 10 12 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingTextField; 11 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionItemPriority;12 13 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionList; 13 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionListItem;14 14 15 15 /** … … 32 32 autoCompletionList = new AutoCompletionList(); 33 33 editor.setAutoCompletionList(autoCompletionList); 34 autoCompletionList.add(new AutoCompletion ListItem("from", AutoCompletionItemPriority.IS_IN_STANDARD));35 autoCompletionList.add(new AutoCompletion ListItem("to", AutoCompletionItemPriority.IS_IN_STANDARD));36 autoCompletionList.add(new AutoCompletion ListItem("via", AutoCompletionItemPriority.IS_IN_STANDARD));37 autoCompletionList.add(new AutoCompletion ListItem("location_hint", AutoCompletionItemPriority.IS_IN_STANDARD));34 autoCompletionList.add(new AutoCompletionItem("from", AutoCompletionPriority.IS_IN_STANDARD)); 35 autoCompletionList.add(new AutoCompletionItem("to", AutoCompletionPriority.IS_IN_STANDARD)); 36 autoCompletionList.add(new AutoCompletionItem("via", AutoCompletionPriority.IS_IN_STANDARD)); 37 autoCompletionList.add(new AutoCompletionItem("location_hint", AutoCompletionPriority.IS_IN_STANDARD)); 38 38 } 39 39 -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java
r33537 r33780 40 40 import org.openstreetmap.josm.command.ChangeCommand; 41 41 import org.openstreetmap.josm.command.conflict.ConflictAddCommand; 42 import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent;43 import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;44 42 import org.openstreetmap.josm.data.conflict.Conflict; 45 43 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; … … 55 53 import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys; 56 54 import org.openstreetmap.josm.plugins.turnrestrictions.qa.IssuesView; 55 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 56 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 57 57 import org.openstreetmap.josm.tools.CheckParameterUtil; 58 58 import org.openstreetmap.josm.tools.ImageProvider; … … 546 546 } 547 547 548 MainApplication.undoRedo.add(new AddCommand(getLayer() , newTurnRestriction));548 MainApplication.undoRedo.add(new AddCommand(getLayer().data, newTurnRestriction)); 549 549 550 550 // make sure everybody is notified about the changes … … 568 568 editorModel.apply(toUpdate); 569 569 Conflict<Relation> conflict = new Conflict<>(getTurnRestriction(), toUpdate); 570 MainApplication.undoRedo.add(new ConflictAddCommand(getLayer() , conflict));570 MainApplication.undoRedo.add(new ConflictAddCommand(getLayer().data, conflict)); 571 571 } 572 572 … … 578 578 if (getTurnRestriction().getDataSet() == null) { 579 579 editorModel.apply(getTurnRestriction()); 580 MainApplication.undoRedo.add(new AddCommand(get TurnRestriction()));580 MainApplication.undoRedo.add(new AddCommand(getLayer().data, getTurnRestriction())); 581 581 } else { 582 582 Relation toUpdate = new Relation(getTurnRestriction()); -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java
r33537 r33780 25 25 import org.openstreetmap.josm.Main; 26 26 import org.openstreetmap.josm.actions.AutoScaleAction; 27 import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent;28 import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;29 27 import org.openstreetmap.josm.data.osm.OsmPrimitive; 30 28 import org.openstreetmap.josm.data.osm.Relation; … … 42 40 import org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionEditorManager; 43 41 import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys; 42 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 43 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 44 44 import org.openstreetmap.josm.tools.ImageProvider; 45 45 -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferencesPanel.java
r32519 r33780 196 196 public void saveToPreferences(Preferences prefs) { 197 197 prefs.put(PreferenceKeys.ROAD_SIGNS, rbSetA.isSelected() ? "set-a" : "set-b"); 198 prefs.put (PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, cbShowViaListInBasicEditor.isSelected());198 prefs.putBoolean(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, cbShowViaListInBasicEditor.isSelected()); 199 199 } 200 200 -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/TurnRestrictionLegSplitRequiredError.java
r33537 r33780 10 10 import javax.swing.AbstractAction; 11 11 12 import org.openstreetmap.josm.actions.SplitWayAction; 13 import org.openstreetmap.josm.actions.SplitWayAction.SplitWayResult; 12 import org.openstreetmap.josm.command.SplitWayCommand; 14 13 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 15 14 import org.openstreetmap.josm.data.osm.Node; … … 131 130 public void actionPerformed(ActionEvent e) { 132 131 133 SplitWay Resultresult = null;132 SplitWayCommand result = null; 134 133 if (role == null || role.equals(TurnRestrictionLegRole.FROM)) { 135 result = SplitWayAction.split( 136 parent.getEditorModel().getLayer(), 134 result = SplitWayCommand.split( 137 135 from, 138 136 Collections.singletonList(intersect), … … 140 138 ); 141 139 if (result != null) { 142 MainApplication.undoRedo.add(result.getCommand());140 MainApplication.undoRedo.add(result); 143 141 } 144 142 } 145 143 146 144 if (role == null || role.equals(TurnRestrictionLegRole.TO)) { 147 result = SplitWayAction.split( 148 parent.getEditorModel().getLayer(), 145 result = SplitWayCommand.split( 149 146 to, 150 147 Collections.singletonList(intersect), … … 152 149 ); 153 150 if (result != null) { 154 MainApplication.undoRedo.add(result .getCommand());151 MainApplication.undoRedo.add(result); 155 152 } 156 153 if (result == null) return;
Note:
See TracChangeset
for help on using the changeset viewer.