Changeset 33537 in osm for applications/editors/josm/plugins/turnrestrictions
- Timestamp:
- 2017-08-26T02:42:22+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/turnrestrictions
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/turnrestrictions/build.xml
r32680 r33537 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="1 0580"/>6 <property name="plugin.main.version" value="12663"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/CreateOrEditTurnRestrictionAction.java
r32519 r33537 8 8 import java.util.Collection; 9 9 10 import org.openstreetmap.josm.Main;11 10 import org.openstreetmap.josm.actions.JosmAction; 12 11 import org.openstreetmap.josm.data.osm.Relation; 12 import org.openstreetmap.josm.gui.MainApplication; 13 13 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 14 14 import org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionEditor; … … 51 51 @Override 52 52 public void actionPerformed(ActionEvent e) { 53 OsmDataLayer layer = Main.getLayerManager().getEditLayer();53 OsmDataLayer layer = getLayerManager().getEditLayer(); 54 54 if (layer == null) return; 55 55 Collection<Relation> trs = TurnRestrictionSelectionPopupPanel.getTurnRestrictionsParticipatingIn(layer.data.getSelected()); … … 59 59 // 60 60 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); 62 62 TurnRestrictionEditorManager.getInstance().positionOnScreen(editor); 63 63 TurnRestrictionEditorManager.getInstance().register(layer, tr, editor); … … 66 66 // let the user choose whether he wants to create a new turn restriction or 67 67 // 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); 71 69 pnl.launch(); 72 70 } -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModel.java
r32519 r33537 12 12 import javax.swing.ListSelectionModel; 13 13 14 import org.openstreetmap.josm.Main;15 14 import org.openstreetmap.josm.data.SelectionChangedListener; 16 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 25 24 import org.openstreetmap.josm.data.osm.event.TagsChangedEvent; 26 25 import org.openstreetmap.josm.data.osm.event.WayNodesChangedEvent; 26 import org.openstreetmap.josm.gui.MainApplication; 27 27 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent; 28 28 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; … … 155 155 @Override 156 156 public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) { 157 OsmDataLayer newLayer = Main .getLayerManager().getEditLayer();157 OsmDataLayer newLayer = MainApplication.getLayerManager().getEditLayer(); 158 158 if (newLayer == null) { 159 159 // don't show a JOSM selection if we don't have a data layer … … 175 175 // only update the JOSM selection if it is changed in the same data layer 176 176 // this turn restriction editor is working on 177 OsmDataLayer layer = Main .getLayerManager().getEditLayer();177 OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer(); 178 178 if (layer == null) return; 179 179 if (layer != this.layer) return; -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionPanel.java
r32519 r33537 22 22 import javax.swing.TransferHandler; 23 23 24 import org.openstreetmap.josm.Main;25 24 import org.openstreetmap.josm.data.osm.OsmPrimitive; 26 25 import org.openstreetmap.josm.data.osm.event.DatasetEventManager; 27 26 import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode; 28 27 import org.openstreetmap.josm.data.osm.event.SelectionEventManager; 28 import org.openstreetmap.josm.gui.MainApplication; 29 29 import org.openstreetmap.josm.gui.OsmPrimitivRenderer; 30 30 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 86 86 */ 87 87 public void wireListeners() { 88 Main .getLayerManager().addActiveLayerChangeListener(model);88 MainApplication.getLayerManager().addActiveLayerChangeListener(model); 89 89 DatasetEventManager.getInstance().addDatasetListener(model, FireMode.IN_EDT); 90 90 SelectionEventManager.getInstance().addSelectionListener(model, FireMode.IN_EDT_CONSOLIDATED); … … 95 95 */ 96 96 public void unwireListeners() { 97 Main .getLayerManager().removeActiveLayerChangeListener(model);97 MainApplication.getLayerManager().removeActiveLayerChangeListener(model); 98 98 DatasetEventManager.getInstance().removeDatasetListener(model); 99 99 SelectionEventManager.getInstance().removeSelectionListener(model); -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberEditorModel.java
r32519 r33537 15 15 import javax.swing.table.AbstractTableModel; 16 16 17 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 17 18 import org.openstreetmap.josm.data.osm.OsmPrimitive; 18 19 import org.openstreetmap.josm.data.osm.PrimitiveId; 19 20 import org.openstreetmap.josm.data.osm.Relation; 20 21 import org.openstreetmap.josm.data.osm.RelationMember; 21 import org.openstreetmap.josm.gui.DefaultNameFormatter;22 22 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 23 23 import org.openstreetmap.josm.tools.CheckParameterUtil; -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java
r32519 r33537 43 43 import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener; 44 44 import org.openstreetmap.josm.data.conflict.Conflict; 45 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 45 46 import org.openstreetmap.josm.data.osm.Relation; 46 47 import org.openstreetmap.josm.data.osm.RelationMember; 47 import org.openstreetmap.josm.gui.DefaultNameFormatter;48 48 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 49 49 import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec; 50 import org.openstreetmap.josm.gui.MainApplication; 50 51 import org.openstreetmap.josm.gui.dialogs.relation.RelationEditor; 51 52 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction; … … 545 546 } 546 547 547 Main .main.undoRedo.add(new AddCommand(getLayer(), newTurnRestriction));548 MainApplication.undoRedo.add(new AddCommand(getLayer(), newTurnRestriction)); 548 549 549 550 // make sure everybody is notified about the changes … … 567 568 editorModel.apply(toUpdate); 568 569 Conflict<Relation> conflict = new Conflict<>(getTurnRestriction(), toUpdate); 569 Main .main.undoRedo.add(new ConflictAddCommand(getLayer(), conflict));570 MainApplication.undoRedo.add(new ConflictAddCommand(getLayer(), conflict)); 570 571 } 571 572 … … 577 578 if (getTurnRestriction().getDataSet() == null) { 578 579 editorModel.apply(getTurnRestriction()); 579 Main .main.undoRedo.add(new AddCommand(getTurnRestriction()));580 MainApplication.undoRedo.add(new AddCommand(getTurnRestriction())); 580 581 } else { 581 582 Relation toUpdate = new Relation(getTurnRestriction()); 582 583 editorModel.apply(toUpdate); 583 Main .main.undoRedo.add(new ChangeCommand(getTurnRestriction(), toUpdate));584 MainApplication.undoRedo.add(new ChangeCommand(getTurnRestriction(), toUpdate)); 584 585 } 585 586 // this will refresh the snapshot and update the dialog title … … 826 827 @Override 827 828 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()); 830 831 } 831 832 Relation tr = getTurnRestriction(); -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorManager.java
r32519 r33537 11 11 import java.util.Map.Entry; 12 12 13 import org.openstreetmap.josm.Main;14 13 import org.openstreetmap.josm.data.osm.PrimitiveId; 15 14 import org.openstreetmap.josm.data.osm.Relation; 15 import org.openstreetmap.josm.gui.MainApplication; 16 16 import org.openstreetmap.josm.gui.layer.Layer; 17 17 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent; … … 39 39 if (TurnRestrictionEditorManager.instance == null) { 40 40 TurnRestrictionEditorManager.instance = new TurnRestrictionEditorManager(); 41 Main .getLayerManager().addLayerChangeListener(TurnRestrictionEditorManager.instance);41 MainApplication.getLayerManager().addLayerChangeListener(TurnRestrictionEditorManager.instance); 42 42 } 43 43 return TurnRestrictionEditorManager.instance; -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditor.java
r32519 r33537 43 43 import javax.swing.event.ListSelectionListener; 44 44 45 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 45 46 import org.openstreetmap.josm.data.osm.OsmPrimitive; 46 47 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 47 48 import org.openstreetmap.josm.data.osm.PrimitiveId; 48 49 import org.openstreetmap.josm.data.osm.Way; 49 import org.openstreetmap.josm.gui.DefaultNameFormatter;50 50 import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher; 51 51 import org.openstreetmap.josm.plugins.turnrestrictions.dnd.PrimitiveIdListProvider; -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegRole.java
r32519 r33537 9 9 TO("to"); 10 10 11 private String osmRoleName;11 private final String osmRoleName; 12 12 13 13 TurnRestrictionLegRole(String osmRoleName) { -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionSelectionPopupPanel.java
r32519 r33537 34 34 import javax.swing.table.TableColumn; 35 35 36 import org.openstreetmap.josm.Main;37 36 import org.openstreetmap.josm.data.osm.OsmPrimitive; 38 37 import org.openstreetmap.josm.data.osm.Relation; 38 import org.openstreetmap.josm.gui.MainApplication; 39 39 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 40 40 import org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionBuilder; … … 197 197 PointerInfo info = MouseInfo.getPointerInfo(); 198 198 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); 200 200 parentPopup.show(); 201 201 btnNew.requestFocusInWindow(); … … 225 225 public void actionPerformed(ActionEvent e) { 226 226 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); 228 228 TurnRestrictionEditorManager.getInstance().positionOnScreen(editor); 229 229 TurnRestrictionEditorManager.getInstance().register(layer, tr, editor); … … 246 246 editor.toFront(); 247 247 } else { 248 editor = new TurnRestrictionEditor(Main .map.mapView, layer, tr);248 editor = new TurnRestrictionEditor(MainApplication.getMap().mapView, layer, tr); 249 249 manager.positionOnScreen(editor); 250 250 manager.register(layer, tr, editor); -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionType.java
r32519 r33537 18 18 ONLY_STRAIGHT_ON("only_straight_on", tr("Only Straight On")); 19 19 20 private String tagValue;21 private String displayName;20 private final String tagValue; 21 private final String displayName; 22 22 23 23 TurnRestrictionType(String tagValue, String displayName) { -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionCellRenderer.java
r32519 r33537 24 24 25 25 import org.openstreetmap.josm.data.Preferences; 26 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 26 27 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 27 28 import org.openstreetmap.josm.data.osm.Relation; 28 29 import org.openstreetmap.josm.data.osm.RelationMember; 29 30 import org.openstreetmap.josm.data.osm.Way; 30 import org.openstreetmap.josm.gui.DefaultNameFormatter;31 31 import org.openstreetmap.josm.gui.widgets.JMultilineLabel; 32 32 import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys; -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetListModel.java
r32519 r33537 8 8 import javax.swing.DefaultListSelectionModel; 9 9 10 import org.openstreetmap.josm.Main;11 10 import org.openstreetmap.josm.data.osm.OsmPrimitive; 12 11 import org.openstreetmap.josm.data.osm.Relation; … … 20 19 import org.openstreetmap.josm.data.osm.event.TagsChangedEvent; 21 20 import org.openstreetmap.josm.data.osm.event.WayNodesChangedEvent; 21 import org.openstreetmap.josm.gui.MainApplication; 22 22 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent; 23 23 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; … … 63 63 @Override 64 64 public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) { 65 OsmDataLayer newLayer = Main .getLayerManager().getEditLayer();65 OsmDataLayer newLayer = MainApplication.getLayerManager().getEditLayer(); 66 66 if (newLayer == null) { 67 67 setTurnRestrictions(null); … … 82 82 @Override 83 83 public void dataChanged(DataChangedEvent event) { 84 OsmDataLayer layer = Main .getLayerManager().getEditLayer();84 OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer(); 85 85 if (layer == null) { 86 86 setTurnRestrictions(null); -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetView.java
r32519 r33537 9 9 import javax.swing.ListSelectionModel; 10 10 11 import org.openstreetmap.josm.Main;12 11 import org.openstreetmap.josm.data.osm.event.DataSetListener; 13 12 import org.openstreetmap.josm.data.osm.event.DatasetEventManager; 14 13 import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode; 14 import org.openstreetmap.josm.gui.MainApplication; 15 15 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; 16 16 … … 32 32 33 33 protected void registerAsListener() { 34 Main .getLayerManager().addActiveLayerChangeListener((ActiveLayerChangeListener) model);34 MainApplication.getLayerManager().addActiveLayerChangeListener((ActiveLayerChangeListener) model); 35 35 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()); 38 38 } 39 39 } 40 40 41 41 protected void unregisterAsListener() { 42 Main .getLayerManager().removeActiveLayerChangeListener((ActiveLayerChangeListener) model);42 MainApplication.getLayerManager().removeActiveLayerChangeListener((ActiveLayerChangeListener) model); 43 43 DatasetEventManager.getInstance().removeDatasetListener((DataSetListener) model); 44 44 } -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionListModel.java
r32519 r33537 8 8 import javax.swing.DefaultListSelectionModel; 9 9 10 import org.openstreetmap.josm.Main;11 10 import org.openstreetmap.josm.data.SelectionChangedListener; 12 11 import org.openstreetmap.josm.data.osm.OsmPrimitive; 13 12 import org.openstreetmap.josm.data.osm.Relation; 13 import org.openstreetmap.josm.gui.MainApplication; 14 14 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent; 15 15 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; … … 51 51 @Override 52 52 public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) { 53 OsmDataLayer newLayer = Main .getLayerManager().getEditLayer();53 OsmDataLayer newLayer = MainApplication.getLayerManager().getEditLayer(); 54 54 if (newLayer == null) { 55 55 setTurnRestrictions(null); -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionView.java
r32519 r33537 10 10 import javax.swing.ListSelectionModel; 11 11 12 import org.openstreetmap.josm.Main;13 12 import org.openstreetmap.josm.data.SelectionChangedListener; 14 13 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 14 import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode; 16 15 import org.openstreetmap.josm.data.osm.event.SelectionEventManager; 16 import org.openstreetmap.josm.gui.MainApplication; 17 17 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; 18 18 … … 37 37 38 38 protected void registerAsListener() { 39 Main .getLayerManager().addActiveLayerChangeListener((ActiveLayerChangeListener) model);39 MainApplication.getLayerManager().addActiveLayerChangeListener((ActiveLayerChangeListener) model); 40 40 SelectionEventManager.getInstance().addSelectionListener((SelectionChangedListener) model, FireMode.IN_EDT_CONSOLIDATED); 41 41 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()); 44 44 } else { 45 45 m.initFromSelection(Collections.<OsmPrimitive>emptyList()); … … 48 48 49 49 protected void unregisterAsListener() { 50 Main .getLayerManager().removeActiveLayerChangeListener((ActiveLayerChangeListener) model);50 MainApplication.getLayerManager().removeActiveLayerChangeListener((ActiveLayerChangeListener) model); 51 51 SelectionEventManager.getInstance().removeSelectionListener((SelectionChangedListener) model); 52 52 } -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java
r32519 r33537 30 30 import org.openstreetmap.josm.data.osm.Relation; 31 31 import org.openstreetmap.josm.data.osm.RelationMember; 32 import org.openstreetmap.josm.gui.MainApplication; 32 33 import org.openstreetmap.josm.gui.SideButton; 33 34 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; … … 79 80 pnlTurnRestrictionsInDataSet.registerAsListener(); 80 81 pnlTurnRestrictionsInSelection.registerAsListener(); 81 Main .getLayerManager().addActiveLayerChangeListener(actNew);82 MainApplication.getLayerManager().addActiveLayerChangeListener(actNew); 82 83 actNew.updateEnabledState(); 83 84 Main.pref.addPreferenceChangeListener(preferenceChangeHandler); … … 89 90 pnlTurnRestrictionsInDataSet.unregisterAsListener(); 90 91 pnlTurnRestrictionsInSelection.unregisterAsListener(); 91 Main .getLayerManager().removeActiveLayerChangeListener(actNew);92 MainApplication.getLayerManager().removeActiveLayerChangeListener(actNew); 92 93 Main.pref.removePreferenceChangeListener(preferenceChangeHandler); 93 94 } … … 207 208 protected Collection<RelationMember> getMembersForCurrentSelection(Relation r) { 208 209 Collection<RelationMember> members = new HashSet<>(); 209 Collection<OsmPrimitive> selection = Main .getLayerManager().getEditLayer().data.getSelected();210 Collection<OsmPrimitive> selection = MainApplication.getLayerManager().getEditLayer().data.getSelected(); 210 211 for (RelationMember member: r.getMembers()) { 211 212 if (selection.contains(member.getMember())) { … … 219 220 if (toEdit == null) 220 221 return; 221 OsmDataLayer layer = Main .getLayerManager().getEditLayer();222 OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer(); 222 223 TurnRestrictionEditorManager manager = TurnRestrictionEditorManager.getInstance(); 223 224 TurnRestrictionEditor editor = manager.getEditorForRelation(layer, toEdit); … … 271 272 return; 272 273 org.openstreetmap.josm.actions.mapmode.DeleteAction.deleteRelation( 273 Main.getLayerManager().getEditLayer(),274 MainApplication.getLayerManager().getEditLayer(), 274 275 toDelete 275 276 ); … … 308 309 309 310 public void run() { 310 OsmDataLayer layer = Main .getLayerManager().getEditLayer();311 OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer(); 311 312 if (layer == null) return; 312 313 Relation tr = new TurnRestrictionBuilder().buildFromSelection(layer); … … 323 324 324 325 public void updateEnabledState() { 325 setEnabled(Main .getLayerManager().getEditLayer() != null);326 setEnabled(MainApplication.getLayerManager().getEditLayer() != null); 326 327 } 327 328 … … 352 353 List<Relation> toSelect = currentListView.getModel().getSelectedTurnRestrictions(); 353 354 if (toSelect.isEmpty()) return; 354 OsmDataLayer layer = Main .getLayerManager().getEditLayer();355 OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer(); 355 356 if (layer == null) return; 356 357 layer.data.setSelected(toSelect); … … 387 388 List<Relation> toSelect = currentListView.getModel().getSelectedTurnRestrictions(); 388 389 if (toSelect.isEmpty()) return; 389 OsmDataLayer layer = Main .getLayerManager().getEditLayer();390 OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer(); 390 391 if (layer == null) return; 391 392 layer.data.setSelected(toSelect); -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListModel.java
r32519 r33537 13 13 import javax.swing.DefaultListSelectionModel; 14 14 15 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 15 16 import org.openstreetmap.josm.data.osm.NameFormatter; 16 17 import org.openstreetmap.josm.data.osm.OsmPrimitive; 17 18 import org.openstreetmap.josm.data.osm.Relation; 18 import org.openstreetmap.josm.gui.DefaultNameFormatter;19 19 20 20 /** -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IdenticalTurnRestrictionLegsError.java
r32519 r33537 8 8 import javax.swing.AbstractAction; 9 9 10 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 10 11 import org.openstreetmap.josm.data.osm.OsmPrimitive; 11 import org.openstreetmap.josm.gui.DefaultNameFormatter;12 12 13 13 /** -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IntersectionMissingAsViaError.java
r32519 r33537 9 9 import javax.swing.AbstractAction; 10 10 11 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 11 12 import org.openstreetmap.josm.data.osm.Node; 12 13 import org.openstreetmap.josm.data.osm.OsmPrimitive; 13 14 import org.openstreetmap.josm.data.osm.Way; 14 import org.openstreetmap.josm.gui.DefaultNameFormatter;15 15 import org.openstreetmap.josm.plugins.turnrestrictions.editor.NavigationControler.BasicEditorFokusTargets; 16 16 -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/TurnRestrictionLegSplitRequiredError.java
r32519 r33537 10 10 import javax.swing.AbstractAction; 11 11 12 import org.openstreetmap.josm.Main;13 12 import org.openstreetmap.josm.actions.SplitWayAction; 14 13 import org.openstreetmap.josm.actions.SplitWayAction.SplitWayResult; 14 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 15 15 import org.openstreetmap.josm.data.osm.Node; 16 16 import org.openstreetmap.josm.data.osm.OsmPrimitive; 17 17 import org.openstreetmap.josm.data.osm.Way; 18 import org.openstreetmap.josm.gui. DefaultNameFormatter;18 import org.openstreetmap.josm.gui.MainApplication; 19 19 import org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionBuilder; 20 20 import org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionLegRole; … … 140 140 ); 141 141 if (result != null) { 142 Main.main.undoRedo.add(result.getCommand());142 MainApplication.undoRedo.add(result.getCommand()); 143 143 } 144 144 } … … 152 152 ); 153 153 if (result != null) { 154 Main .main.undoRedo.add(result.getCommand());154 MainApplication.undoRedo.add(result.getCommand()); 155 155 } 156 156 if (result == null) return; -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/WrongTurnRestrictionLegTypeError.java
r32519 r33537 8 8 import javax.swing.AbstractAction; 9 9 10 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 10 11 import org.openstreetmap.josm.data.osm.OsmPrimitive; 11 import org.openstreetmap.josm.gui.DefaultNameFormatter;12 12 import org.openstreetmap.josm.plugins.turnrestrictions.editor.NavigationControler; 13 13 import org.openstreetmap.josm.plugins.turnrestrictions.editor.NavigationControler.BasicEditorFokusTargets;
Note:
See TracChangeset
for help on using the changeset viewer.