Ignore:
Timestamp:
2017-08-26T02:42:22+02:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12663

Location:
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/CreateOrEditTurnRestrictionAction.java

    r32519 r33537  
    88import java.util.Collection;
    99
    10 import org.openstreetmap.josm.Main;
    1110import org.openstreetmap.josm.actions.JosmAction;
    1211import org.openstreetmap.josm.data.osm.Relation;
     12import org.openstreetmap.josm.gui.MainApplication;
    1313import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1414import org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionEditor;
     
    5151    @Override
    5252    public void actionPerformed(ActionEvent e) {
    53         OsmDataLayer layer = Main.getLayerManager().getEditLayer();
     53        OsmDataLayer layer = getLayerManager().getEditLayer();
    5454        if (layer == null) return;
    5555        Collection<Relation> trs = TurnRestrictionSelectionPopupPanel.getTurnRestrictionsParticipatingIn(layer.data.getSelected());
     
    5959            //
    6060            Relation tr = new TurnRestrictionBuilder().buildFromSelection(layer);
    61             TurnRestrictionEditor editor = new TurnRestrictionEditor(Main.map.mapView, layer, tr);
     61            TurnRestrictionEditor editor = new TurnRestrictionEditor(MainApplication.getMap().mapView, layer, tr);
    6262            TurnRestrictionEditorManager.getInstance().positionOnScreen(editor);
    6363            TurnRestrictionEditorManager.getInstance().register(layer, tr, editor);
     
    6666            // let the user choose whether he wants to create a new turn restriction or
    6767            // edit one of the turn restrictions participating in the current selection
    68             TurnRestrictionSelectionPopupPanel pnl = new TurnRestrictionSelectionPopupPanel(
    69                     layer
    70             );
     68            TurnRestrictionSelectionPopupPanel pnl = new TurnRestrictionSelectionPopupPanel(layer);
    7169            pnl.launch();
    7270        }
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModel.java

    r32519 r33537  
    1212import javax.swing.ListSelectionModel;
    1313
    14 import org.openstreetmap.josm.Main;
    1514import org.openstreetmap.josm.data.SelectionChangedListener;
    1615import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    2524import org.openstreetmap.josm.data.osm.event.TagsChangedEvent;
    2625import org.openstreetmap.josm.data.osm.event.WayNodesChangedEvent;
     26import org.openstreetmap.josm.gui.MainApplication;
    2727import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
    2828import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
     
    155155    @Override
    156156    public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) {
    157         OsmDataLayer newLayer = Main.getLayerManager().getEditLayer();
     157        OsmDataLayer newLayer = MainApplication.getLayerManager().getEditLayer();
    158158        if (newLayer == null) {
    159159            // don't show a JOSM selection if we don't have a data layer
     
    175175        // only update the JOSM selection if it is changed in the same data layer
    176176        // this turn restriction editor is working on
    177         OsmDataLayer layer = Main.getLayerManager().getEditLayer();
     177        OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer();
    178178        if (layer == null) return;
    179179        if (layer != this.layer) return;
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionPanel.java

    r32519 r33537  
    2222import javax.swing.TransferHandler;
    2323
    24 import org.openstreetmap.josm.Main;
    2524import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2625import org.openstreetmap.josm.data.osm.event.DatasetEventManager;
    2726import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode;
    2827import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
     28import org.openstreetmap.josm.gui.MainApplication;
    2929import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
    3030import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     
    8686     */
    8787    public void wireListeners() {
    88         Main.getLayerManager().addActiveLayerChangeListener(model);
     88        MainApplication.getLayerManager().addActiveLayerChangeListener(model);
    8989        DatasetEventManager.getInstance().addDatasetListener(model, FireMode.IN_EDT);
    9090        SelectionEventManager.getInstance().addSelectionListener(model, FireMode.IN_EDT_CONSOLIDATED);
     
    9595     */
    9696    public void unwireListeners() {
    97         Main.getLayerManager().removeActiveLayerChangeListener(model);
     97        MainApplication.getLayerManager().removeActiveLayerChangeListener(model);
    9898        DatasetEventManager.getInstance().removeDatasetListener(model);
    9999        SelectionEventManager.getInstance().removeSelectionListener(model);
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberEditorModel.java

    r32519 r33537  
    1515import javax.swing.table.AbstractTableModel;
    1616
     17import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    1718import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1819import org.openstreetmap.josm.data.osm.PrimitiveId;
    1920import org.openstreetmap.josm.data.osm.Relation;
    2021import org.openstreetmap.josm.data.osm.RelationMember;
    21 import org.openstreetmap.josm.gui.DefaultNameFormatter;
    2222import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2323import org.openstreetmap.josm.tools.CheckParameterUtil;
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java

    r32519 r33537  
    4343import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
    4444import org.openstreetmap.josm.data.conflict.Conflict;
     45import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    4546import org.openstreetmap.josm.data.osm.Relation;
    4647import org.openstreetmap.josm.data.osm.RelationMember;
    47 import org.openstreetmap.josm.gui.DefaultNameFormatter;
    4848import org.openstreetmap.josm.gui.HelpAwareOptionPane;
    4949import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
     50import org.openstreetmap.josm.gui.MainApplication;
    5051import org.openstreetmap.josm.gui.dialogs.relation.RelationEditor;
    5152import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction;
     
    545546            }
    546547
    547             Main.main.undoRedo.add(new AddCommand(getLayer(), newTurnRestriction));
     548            MainApplication.undoRedo.add(new AddCommand(getLayer(), newTurnRestriction));
    548549
    549550            // make sure everybody is notified about the changes
     
    567568            editorModel.apply(toUpdate);
    568569            Conflict<Relation> conflict = new Conflict<>(getTurnRestriction(), toUpdate);
    569             Main.main.undoRedo.add(new ConflictAddCommand(getLayer(), conflict));
     570            MainApplication.undoRedo.add(new ConflictAddCommand(getLayer(), conflict));
    570571        }
    571572
     
    577578            if (getTurnRestriction().getDataSet() == null) {
    578579                editorModel.apply(getTurnRestriction());
    579                 Main.main.undoRedo.add(new AddCommand(getTurnRestriction()));
     580                MainApplication.undoRedo.add(new AddCommand(getTurnRestriction()));
    580581            } else {
    581582                Relation toUpdate = new Relation(getTurnRestriction());
    582583                editorModel.apply(toUpdate);
    583                 Main.main.undoRedo.add(new ChangeCommand(getTurnRestriction(), toUpdate));
     584                MainApplication.undoRedo.add(new ChangeCommand(getTurnRestriction(), toUpdate));
    584585            }
    585586            // this will refresh the snapshot and update the dialog title
     
    826827        @Override
    827828        public void actionPerformed(ActionEvent e) {
    828             if (Main.getLayerManager().getActiveLayer() != getLayer()) {
    829                 Main.getLayerManager().setActiveLayer(getLayer());
     829            if (MainApplication.getLayerManager().getActiveLayer() != getLayer()) {
     830                MainApplication.getLayerManager().setActiveLayer(getLayer());
    830831            }
    831832            Relation tr = getTurnRestriction();
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorManager.java

    r32519 r33537  
    1111import java.util.Map.Entry;
    1212
    13 import org.openstreetmap.josm.Main;
    1413import org.openstreetmap.josm.data.osm.PrimitiveId;
    1514import org.openstreetmap.josm.data.osm.Relation;
     15import org.openstreetmap.josm.gui.MainApplication;
    1616import org.openstreetmap.josm.gui.layer.Layer;
    1717import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
     
    3939        if (TurnRestrictionEditorManager.instance == null) {
    4040            TurnRestrictionEditorManager.instance = new TurnRestrictionEditorManager();
    41             Main.getLayerManager().addLayerChangeListener(TurnRestrictionEditorManager.instance);
     41            MainApplication.getLayerManager().addLayerChangeListener(TurnRestrictionEditorManager.instance);
    4242        }
    4343        return TurnRestrictionEditorManager.instance;
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditor.java

    r32519 r33537  
    4343import javax.swing.event.ListSelectionListener;
    4444
     45import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    4546import org.openstreetmap.josm.data.osm.OsmPrimitive;
    4647import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    4748import org.openstreetmap.josm.data.osm.PrimitiveId;
    4849import org.openstreetmap.josm.data.osm.Way;
    49 import org.openstreetmap.josm.gui.DefaultNameFormatter;
    5050import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher;
    5151import org.openstreetmap.josm.plugins.turnrestrictions.dnd.PrimitiveIdListProvider;
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegRole.java

    r32519 r33537  
    99    TO("to");
    1010
    11     private String osmRoleName;
     11    private final String osmRoleName;
    1212
    1313    TurnRestrictionLegRole(String osmRoleName) {
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionSelectionPopupPanel.java

    r32519 r33537  
    3434import javax.swing.table.TableColumn;
    3535
    36 import org.openstreetmap.josm.Main;
    3736import org.openstreetmap.josm.data.osm.OsmPrimitive;
    3837import org.openstreetmap.josm.data.osm.Relation;
     38import org.openstreetmap.josm.gui.MainApplication;
    3939import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    4040import org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionBuilder;
     
    197197        PointerInfo info = MouseInfo.getPointerInfo();
    198198        Point pt = info.getLocation();
    199         parentPopup = PopupFactory.getSharedInstance().getPopup(Main.map.mapView, this, pt.x, pt.y);
     199        parentPopup = PopupFactory.getSharedInstance().getPopup(MainApplication.getMap().mapView, this, pt.x, pt.y);
    200200        parentPopup.show();
    201201        btnNew.requestFocusInWindow();
     
    225225        public void actionPerformed(ActionEvent e) {
    226226            Relation tr = new TurnRestrictionBuilder().buildFromSelection(layer);
    227             TurnRestrictionEditor editor = new TurnRestrictionEditor(Main.map.mapView, layer, tr);
     227            TurnRestrictionEditor editor = new TurnRestrictionEditor(MainApplication.getMap().mapView, layer, tr);
    228228            TurnRestrictionEditorManager.getInstance().positionOnScreen(editor);
    229229            TurnRestrictionEditorManager.getInstance().register(layer, tr, editor);
     
    246246                editor.toFront();
    247247            } else {
    248                 editor = new TurnRestrictionEditor(Main.map.mapView, layer, tr);
     248                editor = new TurnRestrictionEditor(MainApplication.getMap().mapView, layer, tr);
    249249                manager.positionOnScreen(editor);
    250250                manager.register(layer, tr, editor);
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionType.java

    r32519 r33537  
    1818    ONLY_STRAIGHT_ON("only_straight_on", tr("Only Straight On"));
    1919
    20     private String tagValue;
    21     private String displayName;
     20    private final String tagValue;
     21    private final String displayName;
    2222
    2323    TurnRestrictionType(String tagValue, String displayName) {
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionCellRenderer.java

    r32519 r33537  
    2424
    2525import org.openstreetmap.josm.data.Preferences;
     26import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    2627import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    2728import org.openstreetmap.josm.data.osm.Relation;
    2829import org.openstreetmap.josm.data.osm.RelationMember;
    2930import org.openstreetmap.josm.data.osm.Way;
    30 import org.openstreetmap.josm.gui.DefaultNameFormatter;
    3131import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
    3232import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys;
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetListModel.java

    r32519 r33537  
    88import javax.swing.DefaultListSelectionModel;
    99
    10 import org.openstreetmap.josm.Main;
    1110import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1211import org.openstreetmap.josm.data.osm.Relation;
     
    2019import org.openstreetmap.josm.data.osm.event.TagsChangedEvent;
    2120import org.openstreetmap.josm.data.osm.event.WayNodesChangedEvent;
     21import org.openstreetmap.josm.gui.MainApplication;
    2222import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
    2323import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
     
    6363    @Override
    6464    public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) {
    65         OsmDataLayer newLayer = Main.getLayerManager().getEditLayer();
     65        OsmDataLayer newLayer = MainApplication.getLayerManager().getEditLayer();
    6666        if (newLayer == null) {
    6767            setTurnRestrictions(null);
     
    8282    @Override
    8383    public void dataChanged(DataChangedEvent event) {
    84         OsmDataLayer layer = Main.getLayerManager().getEditLayer();
     84        OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer();
    8585        if (layer == null) {
    8686            setTurnRestrictions(null);
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetView.java

    r32519 r33537  
    99import javax.swing.ListSelectionModel;
    1010
    11 import org.openstreetmap.josm.Main;
    1211import org.openstreetmap.josm.data.osm.event.DataSetListener;
    1312import org.openstreetmap.josm.data.osm.event.DatasetEventManager;
    1413import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode;
     14import org.openstreetmap.josm.gui.MainApplication;
    1515import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
    1616
     
    3232
    3333    protected void registerAsListener() {
    34         Main.getLayerManager().addActiveLayerChangeListener((ActiveLayerChangeListener) model);
     34        MainApplication.getLayerManager().addActiveLayerChangeListener((ActiveLayerChangeListener) model);
    3535        DatasetEventManager.getInstance().addDatasetListener((DataSetListener) model, FireMode.IN_EDT);
    36         if (Main.getLayerManager().getEditLayer() != null) {
    37             model.setTurnRestrictions(Main.getLayerManager().getEditLayer().data.getRelations());
     36        if (MainApplication.getLayerManager().getEditLayer() != null) {
     37            model.setTurnRestrictions(MainApplication.getLayerManager().getEditLayer().data.getRelations());
    3838        }
    3939    }
    4040
    4141    protected void unregisterAsListener() {
    42         Main.getLayerManager().removeActiveLayerChangeListener((ActiveLayerChangeListener) model);
     42        MainApplication.getLayerManager().removeActiveLayerChangeListener((ActiveLayerChangeListener) model);
    4343        DatasetEventManager.getInstance().removeDatasetListener((DataSetListener) model);
    4444    }
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionListModel.java

    r32519 r33537  
    88import javax.swing.DefaultListSelectionModel;
    99
    10 import org.openstreetmap.josm.Main;
    1110import org.openstreetmap.josm.data.SelectionChangedListener;
    1211import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1312import org.openstreetmap.josm.data.osm.Relation;
     13import org.openstreetmap.josm.gui.MainApplication;
    1414import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
    1515import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
     
    5151    @Override
    5252    public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) {
    53         OsmDataLayer newLayer = Main.getLayerManager().getEditLayer();
     53        OsmDataLayer newLayer = MainApplication.getLayerManager().getEditLayer();
    5454        if (newLayer == null) {
    5555            setTurnRestrictions(null);
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionView.java

    r32519 r33537  
    1010import javax.swing.ListSelectionModel;
    1111
    12 import org.openstreetmap.josm.Main;
    1312import org.openstreetmap.josm.data.SelectionChangedListener;
    1413import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1514import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode;
    1615import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
     16import org.openstreetmap.josm.gui.MainApplication;
    1717import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
    1818
     
    3737
    3838    protected void registerAsListener() {
    39         Main.getLayerManager().addActiveLayerChangeListener((ActiveLayerChangeListener) model);
     39        MainApplication.getLayerManager().addActiveLayerChangeListener((ActiveLayerChangeListener) model);
    4040        SelectionEventManager.getInstance().addSelectionListener((SelectionChangedListener) model, FireMode.IN_EDT_CONSOLIDATED);
    4141        TurnRestrictionsInSelectionListModel m = (TurnRestrictionsInSelectionListModel) model;
    42         if (Main.getLayerManager().getEditLayer() != null) {
    43             m.initFromSelection(Main.getLayerManager().getEditLayer().data.getSelected());
     42        if (MainApplication.getLayerManager().getEditLayer() != null) {
     43            m.initFromSelection(MainApplication.getLayerManager().getEditLayer().data.getSelected());
    4444        } else {
    4545            m.initFromSelection(Collections.<OsmPrimitive>emptyList());
     
    4848
    4949    protected void unregisterAsListener() {
    50         Main.getLayerManager().removeActiveLayerChangeListener((ActiveLayerChangeListener) model);
     50        MainApplication.getLayerManager().removeActiveLayerChangeListener((ActiveLayerChangeListener) model);
    5151        SelectionEventManager.getInstance().removeSelectionListener((SelectionChangedListener) model);
    5252    }
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java

    r32519 r33537  
    3030import org.openstreetmap.josm.data.osm.Relation;
    3131import org.openstreetmap.josm.data.osm.RelationMember;
     32import org.openstreetmap.josm.gui.MainApplication;
    3233import org.openstreetmap.josm.gui.SideButton;
    3334import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
     
    7980        pnlTurnRestrictionsInDataSet.registerAsListener();
    8081        pnlTurnRestrictionsInSelection.registerAsListener();
    81         Main.getLayerManager().addActiveLayerChangeListener(actNew);
     82        MainApplication.getLayerManager().addActiveLayerChangeListener(actNew);
    8283        actNew.updateEnabledState();
    8384        Main.pref.addPreferenceChangeListener(preferenceChangeHandler);
     
    8990        pnlTurnRestrictionsInDataSet.unregisterAsListener();
    9091        pnlTurnRestrictionsInSelection.unregisterAsListener();
    91         Main.getLayerManager().removeActiveLayerChangeListener(actNew);
     92        MainApplication.getLayerManager().removeActiveLayerChangeListener(actNew);
    9293        Main.pref.removePreferenceChangeListener(preferenceChangeHandler);
    9394    }
     
    207208        protected Collection<RelationMember> getMembersForCurrentSelection(Relation r) {
    208209            Collection<RelationMember> members = new HashSet<>();
    209             Collection<OsmPrimitive> selection = Main.getLayerManager().getEditLayer().data.getSelected();
     210            Collection<OsmPrimitive> selection = MainApplication.getLayerManager().getEditLayer().data.getSelected();
    210211            for (RelationMember member: r.getMembers()) {
    211212                if (selection.contains(member.getMember())) {
     
    219220            if (toEdit == null)
    220221                return;
    221             OsmDataLayer layer = Main.getLayerManager().getEditLayer();
     222            OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer();
    222223            TurnRestrictionEditorManager manager = TurnRestrictionEditorManager.getInstance();
    223224            TurnRestrictionEditor editor = manager.getEditorForRelation(layer, toEdit);
     
    271272                return;
    272273            org.openstreetmap.josm.actions.mapmode.DeleteAction.deleteRelation(
    273                     Main.getLayerManager().getEditLayer(),
     274                        MainApplication.getLayerManager().getEditLayer(),
    274275                    toDelete
    275276            );
     
    308309
    309310        public void run() {
    310              OsmDataLayer layer = Main.getLayerManager().getEditLayer();
     311             OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer();
    311312             if (layer == null) return;
    312313             Relation tr = new TurnRestrictionBuilder().buildFromSelection(layer);
     
    323324
    324325        public void updateEnabledState() {
    325             setEnabled(Main.getLayerManager().getEditLayer() != null);
     326            setEnabled(MainApplication.getLayerManager().getEditLayer() != null);
    326327        }
    327328
     
    352353            List<Relation> toSelect = currentListView.getModel().getSelectedTurnRestrictions();
    353354            if (toSelect.isEmpty()) return;
    354             OsmDataLayer layer = Main.getLayerManager().getEditLayer();
     355            OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer();
    355356            if (layer == null) return;
    356357            layer.data.setSelected(toSelect);
     
    387388            List<Relation> toSelect = currentListView.getModel().getSelectedTurnRestrictions();
    388389            if (toSelect.isEmpty()) return;
    389             OsmDataLayer layer = Main.getLayerManager().getEditLayer();
     390            OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer();
    390391            if (layer == null) return;
    391392            layer.data.setSelected(toSelect);
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListModel.java

    r32519 r33537  
    1313import javax.swing.DefaultListSelectionModel;
    1414
     15import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    1516import org.openstreetmap.josm.data.osm.NameFormatter;
    1617import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1718import org.openstreetmap.josm.data.osm.Relation;
    18 import org.openstreetmap.josm.gui.DefaultNameFormatter;
    1919
    2020/**
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IdenticalTurnRestrictionLegsError.java

    r32519 r33537  
    88import javax.swing.AbstractAction;
    99
     10import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    1011import org.openstreetmap.josm.data.osm.OsmPrimitive;
    11 import org.openstreetmap.josm.gui.DefaultNameFormatter;
    1212
    1313/**
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IntersectionMissingAsViaError.java

    r32519 r33537  
    99import javax.swing.AbstractAction;
    1010
     11import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    1112import org.openstreetmap.josm.data.osm.Node;
    1213import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1314import org.openstreetmap.josm.data.osm.Way;
    14 import org.openstreetmap.josm.gui.DefaultNameFormatter;
    1515import org.openstreetmap.josm.plugins.turnrestrictions.editor.NavigationControler.BasicEditorFokusTargets;
    1616
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/TurnRestrictionLegSplitRequiredError.java

    r32519 r33537  
    1010import javax.swing.AbstractAction;
    1111
    12 import org.openstreetmap.josm.Main;
    1312import org.openstreetmap.josm.actions.SplitWayAction;
    1413import org.openstreetmap.josm.actions.SplitWayAction.SplitWayResult;
     14import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    1515import org.openstreetmap.josm.data.osm.Node;
    1616import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1717import org.openstreetmap.josm.data.osm.Way;
    18 import org.openstreetmap.josm.gui.DefaultNameFormatter;
     18import org.openstreetmap.josm.gui.MainApplication;
    1919import org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionBuilder;
    2020import org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionLegRole;
     
    140140                  );
    141141                  if (result != null) {
    142                       Main.main.undoRedo.add(result.getCommand());
     142                          MainApplication.undoRedo.add(result.getCommand());
    143143                  }
    144144            }
     
    152152                );
    153153                if (result != null) {
    154                     Main.main.undoRedo.add(result.getCommand());
     154                    MainApplication.undoRedo.add(result.getCommand());
    155155                }
    156156                if (result == null) return;
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/WrongTurnRestrictionLegTypeError.java

    r32519 r33537  
    88import javax.swing.AbstractAction;
    99
     10import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    1011import org.openstreetmap.josm.data.osm.OsmPrimitive;
    11 import org.openstreetmap.josm.gui.DefaultNameFormatter;
    1212import org.openstreetmap.josm.plugins.turnrestrictions.editor.NavigationControler;
    1313import org.openstreetmap.josm.plugins.turnrestrictions.editor.NavigationControler.BasicEditorFokusTargets;
Note: See TracChangeset for help on using the changeset viewer.