Changeset 34567 in osm for applications/editors/josm


Ignore:
Timestamp:
2018-08-18T20:50:44+02:00 (6 years ago)
Author:
donvip
Message:

update to JOSM 14153

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

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/turnrestrictions/.classpath

    r32925 r34567  
    22<classpath>
    33        <classpathentry kind="src" path="src"/>
    4         <classpathentry kind="src" path="test/unit"/>
     4        <classpathentry kind="src" output="buildtest" path="test/unit">
     5                <attributes>
     6                        <attribute name="test" value="true"/>
     7                </attributes>
     8        </classpathentry>
    59        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
    610        <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
  • applications/editors/josm/plugins/turnrestrictions/build.xml

    r34129 r34567  
    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="13564"/>
     6    <property name="plugin.main.version" value="14153"/>
    77
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanel.java

    r32519 r34567  
    1515import javax.swing.JScrollPane;
    1616
    17 import org.openstreetmap.josm.Main;
    18 import org.openstreetmap.josm.data.Preferences;
    1917import org.openstreetmap.josm.gui.help.HelpUtil;
    2018import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel;
    2119import org.openstreetmap.josm.plugins.turnrestrictions.editor.NavigationControler.BasicEditorFokusTargets;
    2220import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys;
     21import org.openstreetmap.josm.spi.preferences.Config;
     22import org.openstreetmap.josm.spi.preferences.IPreferences;
    2323import org.openstreetmap.josm.tools.CheckParameterUtil;
    2424
     
    100100        };
    101101        add(spVias, gc);
    102         if (!Main.pref.getBoolean(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, false)) {
     102        if (!Config.getPref().getBoolean(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, false)) {
    103103            lblVias.setVisible(false);
    104104            spVias.setVisible(false);
     
    171171     * @param prefs the JOSM preferences
    172172     */
    173     public void initIconSetFromPreferences(Preferences prefs) {
     173    public void initIconSetFromPreferences(IPreferences prefs) {
    174174        cbTurnRestrictions.initIconSetFromPreferences(prefs);
    175175    }
     
    181181     * @param prefs the JOSM preferences
    182182     */
    183     public void initViasVisibilityFromPreferences(Preferences prefs) {
     183    public void initViasVisibilityFromPreferences(IPreferences prefs) {
    184184        boolean value = prefs.getBoolean(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, false);
    185185        if (value != lblVias.isVisible()) {
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModel.java

    r33537 r34567  
    1212import javax.swing.ListSelectionModel;
    1313
    14 import org.openstreetmap.josm.data.SelectionChangedListener;
     14import org.openstreetmap.josm.data.osm.DataSelectionListener;
    1515import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1616import org.openstreetmap.josm.data.osm.PrimitiveId;
     
    3737 */
    3838public class JosmSelectionListModel extends AbstractListModel<OsmPrimitive>
    39     implements ActiveLayerChangeListener, SelectionChangedListener, DataSetListener, PrimitiveIdListProvider {
     39    implements ActiveLayerChangeListener, DataSelectionListener, DataSetListener, PrimitiveIdListProvider {
    4040
    4141    private final List<OsmPrimitive> selection = new ArrayList<>();
     
    172172    /* ------------------------------------------------------------------------ */
    173173    @Override
    174     public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
     174    public void selectionChanged(SelectionChangeEvent event) {
    175175        // only update the JOSM selection if it is changed in the same data layer
    176176        // this turn restriction editor is working on
     
    178178        if (layer == null) return;
    179179        if (layer != this.layer) return;
    180         setJOSMSelection(newSelection);
     180        setJOSMSelection(event.getSelection());
    181181    }
    182182
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionPanel.java

    r34129 r34567  
    8888        MainApplication.getLayerManager().addActiveLayerChangeListener(model);
    8989        DatasetEventManager.getInstance().addDatasetListener(model, FireMode.IN_EDT);
    90         SelectionEventManager.getInstance().addSelectionListener(model, FireMode.IN_EDT_CONSOLIDATED);
     90        SelectionEventManager.getInstance().addSelectionListenerForEdt(model);
    9191    }
    9292
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberTable.java

    r32519 r34567  
    3636import org.openstreetmap.josm.plugins.turnrestrictions.dnd.PrimitiveIdTransferable;
    3737import org.openstreetmap.josm.tools.ImageProvider;
     38import org.openstreetmap.josm.tools.Logging;
    3839import org.openstreetmap.josm.tools.Shortcut;
    3940
     
    151152                    model.getRelationMemberEditorModel().insertMembers(ids);
    152153                } catch (IllegalArgumentException e) {
    153                     e.printStackTrace();
     154                    Logging.error(e);
    154155                    // FIXME: provide user feedback
    155156                }
    156             } catch (IOException e) {
    157                 e.printStackTrace();
    158             } catch (UnsupportedFlavorException e) {
    159                 e.printStackTrace();
     157            } catch (IOException | UnsupportedFlavorException e) {
     158                Logging.error(e);
    160159            }
    161160        }
     
    271270                }
    272271                return true;
    273             } catch (IOException e) {
    274                 e.printStackTrace();
    275             } catch (UnsupportedFlavorException e) {
    276                 e.printStackTrace();
     272            } catch (IOException | UnsupportedFlavorException e) {
     273                Logging.error(e);
    277274            }
    278275            return false;
     
    348345                    model.getRelationMemberEditorModel().insertMembers(ids);
    349346                } catch (IllegalArgumentException e) {
    350                     e.printStackTrace();
     347                    Logging.error(e);
    351348                    // FIXME: provide user feedback
    352349                }
    353             } catch (IOException e) {
    354                 e.printStackTrace();
    355             } catch (UnsupportedFlavorException e) {
    356                 e.printStackTrace();
     350            } catch (IOException | UnsupportedFlavorException e) {
     351                Logging.error(e);
    357352            } finally {
    358353                setColumnSelectionAllowed(true);
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBox.java

    r32519 r34567  
    44import javax.swing.JComboBox;
    55
    6 import org.openstreetmap.josm.data.Preferences;
    76import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys;
     7import org.openstreetmap.josm.spi.preferences.IPreferences;
    88/**
    99 * A combo box for selecting a turn restriction type.
     
    3737     * @param prefs the JOSM preferences
    3838     */
    39     public void initIconSetFromPreferences(Preferences prefs) {
     39    public void initIconSetFromPreferences(IPreferences prefs) {
    4040        TurnRestrictionTypeRenderer renderer = (TurnRestrictionTypeRenderer) getRenderer();
    4141        renderer.initIconSetFromPreferences(prefs);
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java

    r34128 r34567  
    3535import javax.swing.KeyStroke;
    3636
    37 import org.openstreetmap.josm.Main;
    3837import org.openstreetmap.josm.actions.AutoScaleAction;
    3938import org.openstreetmap.josm.command.AddCommand;
    4039import org.openstreetmap.josm.command.ChangeCommand;
    4140import org.openstreetmap.josm.command.conflict.ConflictAddCommand;
     41import org.openstreetmap.josm.data.UndoRedoHandler;
    4242import org.openstreetmap.josm.data.conflict.Conflict;
    4343import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
     
    5353import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys;
    5454import org.openstreetmap.josm.plugins.turnrestrictions.qa.IssuesView;
     55import org.openstreetmap.josm.spi.preferences.Config;
    5556import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;
    5657import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
     
    335336            pnlJosmSelection.wireListeners();
    336337            editorModel.registerAsEventListener();
    337             Main.pref.addPreferenceChangeListener(this.preferenceChangeHandler = new PreferenceChangeHandler());
    338             pnlBasicEditor.initIconSetFromPreferences(Main.pref);
     338            Config.getPref().addPreferenceChangeListener(this.preferenceChangeHandler = new PreferenceChangeHandler());
     339            pnlBasicEditor.initIconSetFromPreferences(Config.getPref());
    339340        } else if (!visible && isVisible()) {
    340341            pnlJosmSelection.unwireListeners();
    341342            editorModel.unregisterAsEventListener();
    342             Main.pref.removePreferenceChangeListener(preferenceChangeHandler);
     343            Config.getPref().removePreferenceChangeListener(preferenceChangeHandler);
    343344        }
    344345        super.setVisible(visible);
     
    546547            }
    547548
    548             MainApplication.undoRedo.add(new AddCommand(getLayer().getDataSet(), newTurnRestriction));
     549            UndoRedoHandler.getInstance().add(new AddCommand(getLayer().getDataSet(), newTurnRestriction));
    549550
    550551            // make sure everybody is notified about the changes
     
    568569            editorModel.apply(toUpdate);
    569570            Conflict<Relation> conflict = new Conflict<>(getTurnRestriction(), toUpdate);
    570             MainApplication.undoRedo.add(new ConflictAddCommand(getLayer().getDataSet(), conflict));
     571            UndoRedoHandler.getInstance().add(new ConflictAddCommand(getLayer().getDataSet(), conflict));
    571572        }
    572573
     
    578579            if (getTurnRestriction().getDataSet() == null) {
    579580                editorModel.apply(getTurnRestriction());
    580                 MainApplication.undoRedo.add(new AddCommand(getLayer().getDataSet(), getTurnRestriction()));
     581                UndoRedoHandler.getInstance().add(new AddCommand(getLayer().getDataSet(), getTurnRestriction()));
    581582            } else {
    582583                Relation toUpdate = new Relation(getTurnRestriction());
    583584                editorModel.apply(toUpdate);
    584                 MainApplication.undoRedo.add(new ChangeCommand(getTurnRestriction(), toUpdate));
     585                UndoRedoHandler.getInstance().add(new ChangeCommand(getTurnRestriction(), toUpdate));
    585586            }
    586587            // this will refresh the snapshot and update the dialog title
     
    606607
    607608            int ret = HelpAwareOptionPane.showOptionDialog(
    608                     Main.parent,
     609                    MainApplication.getMainFrame(),
    609610                    tr("<html>This turn restriction has been changed outside of the editor.<br>"
    610611                            + "You cannot apply your changes and continue editing.<br>"
     
    623624        protected void warnDoubleConflict() {
    624625            JOptionPane.showMessageDialog(
    625                     Main.parent,
     626                    MainApplication.getMainFrame(),
    626627                    tr("<html>Layer ''{0}'' already has a conflict for object<br>"
    627628                            + "''{1}''.<br>"
     
    886887    class PreferenceChangeHandler implements PreferenceChangedListener {
    887888        public void refreshIconSet() {
    888             pnlBasicEditor.initIconSetFromPreferences(Main.pref);
     889            pnlBasicEditor.initIconSetFromPreferences(Config.getPref());
    889890        }
    890891
     
    894895                refreshIconSet();
    895896            } else if (evt.getKey().equals(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR)) {
    896                 pnlBasicEditor.initViasVisibilityFromPreferences(Main.pref);
     897                pnlBasicEditor.initViasVisibilityFromPreferences(Config.getPref());
    897898            }
    898899        }
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeRenderer.java

    r32925 r34567  
    1515import javax.swing.UIManager;
    1616
    17 import org.openstreetmap.josm.data.Preferences;
    1817import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys;
     18import org.openstreetmap.josm.spi.preferences.IPreferences;
    1919import org.openstreetmap.josm.tools.ImageProvider;
    2020
     
    6161     * @param prefs the JOSM preferences
    6262     */
    63     public void initIconSetFromPreferences(Preferences prefs) {
     63    public void initIconSetFromPreferences(IPreferences prefs) {
    6464        iconSet = prefs.get(PreferenceKeys.ROAD_SIGNS, "set-a");
    6565        iconSet = iconSet.trim().toLowerCase();
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaList.java

    r34129 r34567  
    3838import org.openstreetmap.josm.plugins.turnrestrictions.dnd.PrimitiveIdTransferable;
    3939import org.openstreetmap.josm.tools.ImageProvider;
     40import org.openstreetmap.josm.tools.Logging;
    4041import org.openstreetmap.josm.tools.Shortcut;
    4142
     
    131132                    List<PrimitiveId> idsToAdd = (List<PrimitiveId>) t.getTransferData(PrimitiveIdTransferable.PRIMITIVE_ID_LIST_FLAVOR);
    132133                    model.insertVias(idsToAdd);
    133                 } catch (IOException e) {
    134                     e.printStackTrace();
    135                 } catch (UnsupportedFlavorException e) {
    136                     e.printStackTrace();
     134                } catch (IOException | UnsupportedFlavorException e) {
     135                    Logging.error(e);
    137136                }
    138137            }
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/AbstractTurnRestrictionsListView.java

    r32519 r34567  
    66import javax.swing.event.ListSelectionListener;
    77
    8 import org.openstreetmap.josm.data.Preferences;
    98import org.openstreetmap.josm.data.osm.Relation;
     9import org.openstreetmap.josm.spi.preferences.IPreferences;
    1010
    1111/**
     
    3636    }
    3737
    38     public void initIconSetFromPreferences(Preferences prefs) {
     38    public void initIconSetFromPreferences(IPreferences prefs) {
    3939        TurnRestrictionCellRenderer renderer = (TurnRestrictionCellRenderer) lstTurnRestrictions.getCellRenderer();
    4040        renderer.initIconSetFromPreferences(prefs);
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionCellRenderer.java

    r33537 r34567  
    2323import javax.swing.table.TableCellRenderer;
    2424
    25 import org.openstreetmap.josm.data.Preferences;
    2625import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    2726import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
     
    3130import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
    3231import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys;
     32import org.openstreetmap.josm.spi.preferences.IPreferences;
    3333import org.openstreetmap.josm.tools.ImageProvider;
    3434
     
    220220     * @param prefs the JOSM preferences
    221221     */
    222     public void initIconSetFromPreferences(Preferences prefs) {
     222    public void initIconSetFromPreferences(IPreferences prefs) {
    223223
    224224        iconSet = prefs.get(PreferenceKeys.ROAD_SIGNS, "set-a");
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionListModel.java

    r33537 r34567  
    88import javax.swing.DefaultListSelectionModel;
    99
    10 import org.openstreetmap.josm.data.SelectionChangedListener;
     10import org.openstreetmap.josm.data.osm.DataSelectionListener;
    1111import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1212import org.openstreetmap.josm.data.osm.Relation;
     
    2121 */
    2222public class TurnRestrictionsInSelectionListModel extends TurnRestrictionsListModel
    23     implements ActiveLayerChangeListener, SelectionChangedListener {
     23    implements ActiveLayerChangeListener, DataSelectionListener {
    2424
    2525    public TurnRestrictionsInSelectionListModel(
     
    6363    /* --------------------------------------------------------------------------- */
    6464    @Override
    65     public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
    66         initFromSelection(newSelection);
     65    public void selectionChanged(SelectionChangeEvent event) {
     66        initFromSelection(event.getSelection());
    6767    }
    6868}
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionView.java

    r33537 r34567  
    1010import javax.swing.ListSelectionModel;
    1111
    12 import org.openstreetmap.josm.data.SelectionChangedListener;
     12import org.openstreetmap.josm.data.osm.DataSelectionListener;
    1313import org.openstreetmap.josm.data.osm.OsmPrimitive;
    14 import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode;
    1514import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
    1615import org.openstreetmap.josm.gui.MainApplication;
     
    3837    protected void registerAsListener() {
    3938        MainApplication.getLayerManager().addActiveLayerChangeListener((ActiveLayerChangeListener) model);
    40         SelectionEventManager.getInstance().addSelectionListener((SelectionChangedListener) model, FireMode.IN_EDT_CONSOLIDATED);
     39        SelectionEventManager.getInstance().addSelectionListenerForEdt((DataSelectionListener) model);
    4140        TurnRestrictionsInSelectionListModel m = (TurnRestrictionsInSelectionListModel) model;
    4241        if (MainApplication.getLayerManager().getEditLayer() != null) {
     
    4948    protected void unregisterAsListener() {
    5049        MainApplication.getLayerManager().removeActiveLayerChangeListener((ActiveLayerChangeListener) model);
    51         SelectionEventManager.getInstance().removeSelectionListener((SelectionChangedListener) model);
     50        SelectionEventManager.getInstance().removeSelectionListener((DataSelectionListener) model);
    5251    }
    5352
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java

    r33780 r34567  
    2323import javax.swing.event.ListSelectionListener;
    2424
    25 import org.openstreetmap.josm.Main;
    2625import org.openstreetmap.josm.actions.AutoScaleAction;
    2726import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    4039import org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionEditorManager;
    4140import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys;
     41import org.openstreetmap.josm.spi.preferences.Config;
    4242import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;
    4343import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
     
    8282        MainApplication.getLayerManager().addActiveLayerChangeListener(actNew);
    8383        actNew.updateEnabledState();
    84         Main.pref.addPreferenceChangeListener(preferenceChangeHandler);
     84        Config.getPref().addPreferenceChangeListener(preferenceChangeHandler);
    8585        preferenceChangeHandler.refreshIconSet();
    8686    }
     
    9191        pnlTurnRestrictionsInSelection.unregisterAsListener();
    9292        MainApplication.getLayerManager().removeActiveLayerChangeListener(actNew);
    93         Main.pref.removePreferenceChangeListener(preferenceChangeHandler);
     93        Config.getPref().removePreferenceChangeListener(preferenceChangeHandler);
    9494    }
    9595
     
    445445    class PreferenceChangeHandler implements PreferenceChangedListener {
    446446        public void refreshIconSet() {
    447             pnlTurnRestrictionsInDataSet.initIconSetFromPreferences(Main.pref);
    448             pnlTurnRestrictionsInSelection.initIconSetFromPreferences(Main.pref);
     447            pnlTurnRestrictionsInDataSet.initIconSetFromPreferences(Config.getPref());
     448            pnlTurnRestrictionsInSelection.initIconSetFromPreferences(Config.getPref());
    449449            repaint();
    450450        }
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceEditor.java

    r32925 r34567  
    1919import javax.swing.event.HyperlinkListener;
    2020
    21 import org.openstreetmap.josm.Main;
    2221import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
    2322import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
    2423import org.openstreetmap.josm.gui.widgets.HtmlPanel;
     24import org.openstreetmap.josm.spi.preferences.Config;
    2525import org.openstreetmap.josm.tools.GBC;
    2626import org.openstreetmap.josm.tools.ImageProvider;
     
    8383
    8484        pnlIconPreferences = new PreferencesPanel();
    85         pnlIconPreferences.initFromPreferences(Main.pref);
     85        pnlIconPreferences.initFromPreferences(Config.getPref());
    8686
    8787        JScrollPane sp = new JScrollPane(pnlIconPreferences);
     
    113113    @Override
    114114    public boolean ok() {
    115         pnlIconPreferences.saveToPreferences(Main.pref);
     115        pnlIconPreferences.saveToPreferences(Config.getPref());
    116116        return false;
    117117    }
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferencesPanel.java

    r33780 r34567  
    1717import javax.swing.JSeparator;
    1818
    19 import org.openstreetmap.josm.data.Preferences;
    2019import org.openstreetmap.josm.gui.widgets.HtmlPanel;
    2120import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel;
    2221import org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionType;
     22import org.openstreetmap.josm.spi.preferences.IPreferences;
    2323import org.openstreetmap.josm.tools.ImageProvider;
    2424
     
    171171     * @param prefs the preferences
    172172     */
    173     public void initFromPreferences(Preferences prefs) {
     173    public void initFromPreferences(IPreferences prefs) {
    174174        String set = prefs.get(PreferenceKeys.ROAD_SIGNS, "set-a");
    175175        if (!set.equals("set-a") && !set.equals("set-b")) {
     
    194194     * @param prefs the preferences
    195195     */
    196     public void saveToPreferences(Preferences prefs) {
     196    public void saveToPreferences(IPreferences prefs) {
    197197        prefs.put(PreferenceKeys.ROAD_SIGNS, rbSetA.isSelected() ? "set-a" : "set-b");
    198198        prefs.putBoolean(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, cbShowViaListInBasicEditor.isSelected());
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/TurnRestrictionLegSplitRequiredError.java

    r33780 r34567  
    1111
    1212import org.openstreetmap.josm.command.SplitWayCommand;
     13import org.openstreetmap.josm.data.UndoRedoHandler;
    1314import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    1415import org.openstreetmap.josm.data.osm.Node;
    1516import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1617import org.openstreetmap.josm.data.osm.Way;
    17 import org.openstreetmap.josm.gui.MainApplication;
    1818import org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionBuilder;
    1919import org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionLegRole;
     
    138138                  );
    139139                  if (result != null) {
    140                       MainApplication.undoRedo.add(result);
     140                      UndoRedoHandler.getInstance().add(result);
    141141                  }
    142142            }
     
    149149                );
    150150                if (result != null) {
    151                     MainApplication.undoRedo.add(result);
     151                    UndoRedoHandler.getInstance().add(result);
    152152                }
    153153                if (result == null) return;
Note: See TracChangeset for help on using the changeset viewer.