Ignore:
Timestamp:
2017-11-05T19:31:50+01:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12859

Location:
applications/editors/josm/plugins/turnrestrictions
Files:
6 edited

Legend:

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

    r33537 r33780  
    44    <property name="commit.message" value="Adapt to JOSM core change (DefaultNameFormatter)"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="12663"/>
     6    <property name="plugin.main.version" value="12859"/>
    77
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/MemberRoleCellEditor.java

    r32519 r33780  
    88import javax.swing.table.TableCellEditor;
    99
     10import org.openstreetmap.josm.data.tagging.ac.AutoCompletionItem;
     11import org.openstreetmap.josm.data.tagging.ac.AutoCompletionPriority;
    1012import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingTextField;
    11 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionItemPriority;
    1213import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionList;
    13 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionListItem;
    1414
    1515/**
     
    3232        autoCompletionList = new AutoCompletionList();
    3333        editor.setAutoCompletionList(autoCompletionList);
    34         autoCompletionList.add(new AutoCompletionListItem("from", AutoCompletionItemPriority.IS_IN_STANDARD));
    35         autoCompletionList.add(new AutoCompletionListItem("to", AutoCompletionItemPriority.IS_IN_STANDARD));
    36         autoCompletionList.add(new AutoCompletionListItem("via", AutoCompletionItemPriority.IS_IN_STANDARD));
    37         autoCompletionList.add(new AutoCompletionListItem("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));
    3838    }
    3939
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java

    r33537 r33780  
    4040import org.openstreetmap.josm.command.ChangeCommand;
    4141import org.openstreetmap.josm.command.conflict.ConflictAddCommand;
    42 import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent;
    43 import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
    4442import org.openstreetmap.josm.data.conflict.Conflict;
    4543import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
     
    5553import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys;
    5654import org.openstreetmap.josm.plugins.turnrestrictions.qa.IssuesView;
     55import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;
     56import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
    5757import org.openstreetmap.josm.tools.CheckParameterUtil;
    5858import org.openstreetmap.josm.tools.ImageProvider;
     
    546546            }
    547547
    548             MainApplication.undoRedo.add(new AddCommand(getLayer(), newTurnRestriction));
     548            MainApplication.undoRedo.add(new AddCommand(getLayer().data, newTurnRestriction));
    549549
    550550            // make sure everybody is notified about the changes
     
    568568            editorModel.apply(toUpdate);
    569569            Conflict<Relation> conflict = new Conflict<>(getTurnRestriction(), toUpdate);
    570             MainApplication.undoRedo.add(new ConflictAddCommand(getLayer(), conflict));
     570            MainApplication.undoRedo.add(new ConflictAddCommand(getLayer().data, conflict));
    571571        }
    572572
     
    578578            if (getTurnRestriction().getDataSet() == null) {
    579579                editorModel.apply(getTurnRestriction());
    580                 MainApplication.undoRedo.add(new AddCommand(getTurnRestriction()));
     580                MainApplication.undoRedo.add(new AddCommand(getLayer().data, getTurnRestriction()));
    581581            } else {
    582582                Relation toUpdate = new Relation(getTurnRestriction());
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java

    r33537 r33780  
    2525import org.openstreetmap.josm.Main;
    2626import org.openstreetmap.josm.actions.AutoScaleAction;
    27 import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent;
    28 import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
    2927import org.openstreetmap.josm.data.osm.OsmPrimitive;
    3028import org.openstreetmap.josm.data.osm.Relation;
     
    4240import org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionEditorManager;
    4341import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys;
     42import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;
     43import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
    4444import org.openstreetmap.josm.tools.ImageProvider;
    4545
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferencesPanel.java

    r32519 r33780  
    196196    public void saveToPreferences(Preferences prefs) {
    197197        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());
    199199    }
    200200
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/TurnRestrictionLegSplitRequiredError.java

    r33537 r33780  
    1010import javax.swing.AbstractAction;
    1111
    12 import org.openstreetmap.josm.actions.SplitWayAction;
    13 import org.openstreetmap.josm.actions.SplitWayAction.SplitWayResult;
     12import org.openstreetmap.josm.command.SplitWayCommand;
    1413import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    1514import org.openstreetmap.josm.data.osm.Node;
     
    131130        public void actionPerformed(ActionEvent e) {
    132131
    133             SplitWayResult result = null;
     132            SplitWayCommand result = null;
    134133            if (role == null || role.equals(TurnRestrictionLegRole.FROM)) {
    135                   result = SplitWayAction.split(
    136                           parent.getEditorModel().getLayer(),
     134                  result = SplitWayCommand.split(
    137135                          from,
    138136                          Collections.singletonList(intersect),
     
    140138                  );
    141139                  if (result != null) {
    142                           MainApplication.undoRedo.add(result.getCommand());
     140                      MainApplication.undoRedo.add(result);
    143141                  }
    144142            }
    145143
    146144            if (role == null || role.equals(TurnRestrictionLegRole.TO)) {
    147                 result = SplitWayAction.split(
    148                         parent.getEditorModel().getLayer(),
     145                result = SplitWayCommand.split(
    149146                        to,
    150147                        Collections.singletonList(intersect),
     
    152149                );
    153150                if (result != null) {
    154                     MainApplication.undoRedo.add(result.getCommand());
     151                    MainApplication.undoRedo.add(result);
    155152                }
    156153                if (result == null) return;
Note: See TracChangeset for help on using the changeset viewer.