Changeset 32329 in osm for applications/editors
- Timestamp:
- 2016-06-19T16:08:56+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 72 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/CommandLine/build.xml
r31926 r32329 4 4 <property name="commit.message" value="JOSM/CommandLine: fix exception after JOSM update"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value=" 9170"/>6 <property name="plugin.main.version" value="10279"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java
r31927 r32329 369 369 break; 370 370 case IMAGERYURL: 371 Layer layer = Main. map.mapView.getActiveLayer();371 Layer layer = Main.getLayerManager().getActiveLayer(); 372 372 if (layer != null) { 373 373 if (!(layer instanceof ImageryLayer)) { 374 List<ImageryLayer> imageryLayers = Main. map.mapView.getLayersOfType(ImageryLayer.class);374 List<ImageryLayer> imageryLayers = Main.getLayerManager().getLayersOfType(ImageryLayer.class); 375 375 if (imageryLayers.size() == 1) { 376 376 layer = imageryLayers.get(0); … … 389 389 break; 390 390 case IMAGERYOFFSET: 391 Layer olayer = Main. map.mapView.getActiveLayer();391 Layer olayer = Main.getLayerManager().getActiveLayer(); 392 392 if (olayer != null) { 393 393 if (!(olayer instanceof ImageryLayer)) { 394 List<ImageryLayer> imageryLayers = Main. map.mapView.getLayersOfType(ImageryLayer.class);394 List<ImageryLayer> imageryLayers = Main.getLayerManager().getLayersOfType(ImageryLayer.class); 395 395 if (imageryLayers.size() == 1) { 396 396 olayer = imageryLayers.get(0); … … 597 597 GpxFilter gpxFilter = new GpxFilter(); 598 598 gpxFilter.initBboxFilter(bbox); 599 List<GpxLayer> gpxLayers = Main. map.mapView.getLayersOfType(GpxLayer.class);599 List<GpxLayer> gpxLayers = Main.getLayerManager().getLayersOfType(GpxLayer.class); 600 600 for (GpxLayer gpxLayer : gpxLayers) { 601 601 gpxFilter.addGpxData(gpxLayer.data); -
applications/editors/josm/plugins/CustomizePublicTransportStop/.project
r32286 r32329 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <projectDescription> 3 <name> josmPlugins</name>3 <name>JOSM-CustomizePublicTransportStop</name> 4 4 <comment>JavaCC Nature</comment> 5 5 <projects> -
applications/editors/josm/plugins/DirectUpload/build.xml
r31949 r32329 5 5 <property name="commit.message" value="applied JOSM Ticket 4498 (patch by ax) - oauth support for gpx upload (I accidentally committed parts of the path in [24236])"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value=" 9314"/>7 <property name="plugin.main.version" value="10279"/> 8 8 9 9 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadOsmConnection.java
r31871 r32329 11 11 import org.openstreetmap.josm.gui.layer.GpxLayer; 12 12 import org.openstreetmap.josm.gui.layer.Layer; 13 import org.openstreetmap.josm.gui.layer.MainLayerManager; 13 14 import org.openstreetmap.josm.io.OsmConnection; 14 15 import org.openstreetmap.josm.io.OsmTransferException; … … 49 50 GpxData autoSelectTrace() { 50 51 if (Main.map != null && Main.map.mapView != null) { 51 Ma pView mv = Main.map.mapView;52 MainLayerManager lm = Main.getLayerManager(); 52 53 // List<Layer> allLayers = new ArrayList<Layer>(mv.getAllLayersAsList()); // modifiable 53 54 List<Layer> selectedLayers = LayerListDialog.getInstance().getModel().getSelectedLayers(); 54 List<GpxLayer> gpxLayersRemaining = mv.getLayersOfType(GpxLayer.class);55 List<GpxLayer> gpxLayersRemaining = lm.getLayersOfType(GpxLayer.class); 55 56 gpxLayersRemaining.removeAll(selectedLayers); 56 57 GpxLayer traceLayer = null; … … 68 69 } 69 70 // active layer 70 else if ( mv.getActiveLayer() instanceof GpxLayer) {71 traceLayer = (GpxLayer) mv.getActiveLayer();71 else if (lm.getActiveLayer() instanceof GpxLayer) { 72 traceLayer = (GpxLayer) lm.getActiveLayer(); 72 73 } 73 74 } 74 75 75 76 if (traceLayer != null) { 76 GpxData data = traceLayer.data; 77 return data; 77 return traceLayer.data; 78 78 } 79 79 } -
applications/editors/josm/plugins/ElevationProfile/build.xml
r32027 r32329 4 4 <property name="commit.message" value="[josm_elevationprofile]"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value=" 9620"/>6 <property name="plugin.main.version" value="10279"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileDialog.java
r32315 r32329 196 196 MapView.addLayerChangeListener(this); 197 197 if (Main.isDisplayingMapView()) { 198 Layer layer = Main. map.mapView.getActiveLayer();198 Layer layer = Main.getLayerManager().getActiveLayer(); 199 199 if (layer instanceof GpxLayer) { 200 200 setActiveLayer((GpxLayer) layer); -
applications/editors/josm/plugins/NanoLog/build.xml
r31981 r32329 5 5 <property name="commit.message" value="NanoLog"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value=" 9383"/>7 <property name="plugin.main.version" value="10279"/> 8 8 <property name="plugin.author" value="Ilya Zverev"/> 9 9 <property name="plugin.class" value="nanolog.NanoLogPlugin"/> -
applications/editors/josm/plugins/NanoLog/src/nanolog/GPXChooser.java
r30491 r32329 19 19 public static GpxLayer topLayer() { 20 20 // return first found local layer 21 for( Layer layer : Main. map.mapView.getAllLayers() ) {21 for( Layer layer : Main.getLayerManager().getLayers() ) { 22 22 if( layer instanceof GpxLayer && ((GpxLayer)layer).isLocalFile() ) 23 23 return (GpxLayer)layer; -
applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogLayer.java
r31981 r32329 298 298 public void mousePressed( MouseEvent e ) { 299 299 int nearest = nearestEntry(e); 300 if( nearest > 0 && Main. map.mapView.getActiveLayer() == NanoLogLayer.this ) {300 if( nearest > 0 && Main.getLayerManager().getActiveLayer() == NanoLogLayer.this ) { 301 301 dragging = nearest; 302 302 doDrag(e); -
applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPanel.java
r30737 r32329 37 37 public void updateMarkers() { 38 38 List<NanoLogEntry> entries = new ArrayList<>(); 39 for( NanoLogLayer l : Main. map.mapView.getLayersOfType(NanoLogLayer.class) ) {39 for( NanoLogLayer l : Main.getLayerManager().getLayersOfType(NanoLogLayer.class) ) { 40 40 entries.addAll(l.getEntries()); 41 41 } -
applications/editors/josm/plugins/cadastre-fr/build.xml
r32054 r32329 4 4 <property name="commit.message" value="Changed constructor for Plugin"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value=" 9759"/>6 <property name="plugin.main.version" value="10279"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java
r32212 r32329 576 576 private static void checkLayerDuplicates(WMSLayer wmsLayer) throws DuplicateLayerException { 577 577 if (Main.map != null) { 578 for (Layer l : Main. map.mapView.getAllLayers()) {578 for (Layer l : Main.getLayerManager().getLayers()) { 579 579 if (l instanceof WMSLayer && l.getName().equals(wmsLayer.getName()) && (!l.equals(wmsLayer))) { 580 580 Main.info("Try to grab into a new layer when "+wmsLayer.getName()+" is already opened."); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
r32164 r32329 456 456 public static void addWMSLayer(WMSLayer wmsLayer) { 457 457 if (Main.map != null && Main.map.mapView != null) { 458 int wmsNewLayerPos = Main. map.mapView.getAllLayers().size();459 for(Layer l : Main. map.mapView.getLayersOfType(WMSLayer.class)) {458 int wmsNewLayerPos = Main.getLayerManager().getLayers().size(); 459 for(Layer l : Main.getLayerManager().getLayersOfType(WMSLayer.class)) { 460 460 int wmsPos = Main.map.mapView.getLayerPos(l); 461 461 if (wmsPos < wmsNewLayerPos) wmsNewLayerPos = wmsPos; -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java
r29714 r32329 2 2 package cadastre_fr; 3 3 4 import static org.openstreetmap.josm.tools.I18n.marktr; 4 5 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.tools.I18n.marktr;6 6 7 7 import java.awt.event.ActionEvent; … … 12 12 import org.openstreetmap.josm.Main; 13 13 import org.openstreetmap.josm.actions.JosmAction; 14 import org.openstreetmap.josm.gui.layer.Layer;15 14 16 15 public class MenuActionGrabPlanImage extends JosmAction implements Runnable { … … 36 35 if (wmsLayer == null || Main.map == null || Main.map.mapView == null) return; 37 36 if (!rasterImageGeoreferencer.isRunning()) return; 38 for (Layer l : Main.map.mapView.getAllLayersAsList()) 39 if (l == wmsLayer) 40 return; 37 if (Main.getLayerManager().containsLayer(wmsLayer)) 38 return; 41 39 JOptionPane.showMessageDialog(Main.parent, tr("Georeferencing interrupted")); 42 40 rasterImageGeoreferencer.actionInterrupted(); 43 41 } 44 42 45 public void actionPerformed(ActionEvent ae) { 43 @Override 44 public void actionPerformed(ActionEvent ae) { 46 45 if (Main.map != null) { 47 46 if (CadastrePlugin.isCadastreProjection()) { … … 58 57 } 59 58 60 public void run() { 59 @Override 60 public void run() { 61 61 // wait until plan image is fully loaded and joined into one single image 62 62 boolean loadedFromCache = downloadWMSPlanImage.waitFinished(); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java
r32211 r32329 69 69 // check if the selected cache is not already displayed 70 70 if (Main.map != null) { 71 for (Layer l : Main. map.mapView.getAllLayers()) {71 for (Layer l : Main.getLayerManager().getLayers()) { 72 72 if (l instanceof WMSLayer && l.getName().equals(location)) { 73 73 JOptionPane.showMessageDialog(Main.parent, tr("The location {0} is already on screen. Cache not loaded.", filename), tr("Error"), JOptionPane.ERROR_MESSAGE); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java
r32060 r32329 106 106 Main.pref.put("cadastrewms.codeDepartement", codeDepartement); 107 107 if (Main.map != null) { 108 for (Layer l : Main. map.mapView.getAllLayers()) {108 for (Layer l : Main.getLayerManager().getLayers()) { 109 109 if (l instanceof WMSLayer && l.getName().equalsIgnoreCase(location)) { 110 110 return null; … … 118 118 CadastrePlugin.addWMSLayer(wmsLayer); 119 119 Main.info("Add new layer with Location:" + inputTown.getText()); 120 } else if (existingLayers != null && existingLayers.size() > 0 && Main. map.mapView.getActiveLayer() instanceof WMSLayer) {121 wmsLayer = (WMSLayer)Main. map.mapView.getActiveLayer();120 } else if (existingLayers != null && existingLayers.size() > 0 && Main.getLayerManager().getActiveLayer() instanceof WMSLayer) { 121 wmsLayer = (WMSLayer)Main.getLayerManager().getActiveLayer(); 122 122 } 123 123 -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSAdjustAction.java
r29595 r32329 41 41 @Override public void enterMode() { 42 42 if (Main.map != null) { 43 if (Main. map.mapView.getActiveLayer() instanceof WMSLayer) {44 modifiedLayer = (WMSLayer)Main. map.mapView.getActiveLayer();43 if (Main.getLayerManager().getActiveLayer() instanceof WMSLayer) { 44 modifiedLayer = (WMSLayer)Main.getLayerManager().getActiveLayer(); 45 45 super.enterMode(); 46 46 Main.map.mapView.addMouseListener(this); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSDownloadAction.java
r30737 r32329 27 27 ArrayList<WMSLayer> existingWMSlayers = new ArrayList<>(); 28 28 if (Main.map != null) { 29 Layer activeLayer = Main. map.mapView.getActiveLayer();29 Layer activeLayer = Main.getLayerManager().getActiveLayer(); 30 30 if (activeLayer instanceof WMSLayer) 31 31 return (WMSLayer) activeLayer; 32 for (Layer l : Main. map.mapView.getAllLayers()) {32 for (Layer l : Main.getLayerManager().getLayers()) { 33 33 if (l instanceof WMSLayer) { 34 34 existingWMSlayers.add((WMSLayer)l); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
r32211 r32329 160 160 grabThread.setGrabber(grabber); 161 161 // if it is the first layer, use the communeBBox as grab bbox (and not divided) 162 if (Main. map.mapView.getAllLayers().size() == 1 ) {162 if (Main.getLayerManager().getLayers().size() == 1 ) { 163 163 final Bounds bounds = this.getCommuneBBox().toBounds(); 164 164 GuiHelper.runInEDTAndWait(new Runnable() { -
applications/editors/josm/plugins/gpsblam/build.xml
r31926 r32329 5 5 <property name="commit.message" value="Commit message"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value=" 7001"/>7 <property name="plugin.main.version" value="10279"/> 8 8 9 9 <!-- -
applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java
r30761 r32329 27 27 // within given radius of line between given points 28 28 GPSBlamInputData(Point p1, Point p2, int radius) { 29 Collection<Layer> layers = Main. map.mapView.getAllLayers();29 Collection<Layer> layers = Main.getLayerManager().getLayers(); 30 30 for (Layer l : layers) { 31 31 if (l.isVisible() && l instanceof GpxLayer) { -
applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/downloadtask/DownloadXmlBoundsTask.java
r30735 r32329 73 73 int count = 0; 74 74 if (!Main.isDisplayingMapView()) return 0; 75 for (Layer layer : Main. map.mapView.getAllLayers()) {75 for (Layer layer : Main.getLayerManager().getLayers()) { 76 76 if (layer instanceof XmlBoundsLayer) { 77 77 count++; … … 84 84 protected OsmDataLayer getFirstDataLayer() { 85 85 if (!Main.isDisplayingMapView()) return null; 86 for (Layer layer : Main. map.mapView.getAllLayersAsList()) {86 for (Layer layer : Main.getLayerManager().getLayers()) { 87 87 if (layer instanceof XmlBoundsLayer) 88 88 return (XmlBoundsLayer) layer; -
applications/editors/josm/plugins/imagery_offset_db/build.xml
r32046 r32329 5 5 <property name="commit.message" value="Imagery Offset Database"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value=" 9168"/>7 <property name="plugin.main.version" value="10279"/> 8 8 <property name="plugin.canloadatruntime" value="true"/> 9 9 -
applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetTools.java
r30218 r32329 30 30 if( Main.map == null || Main.map.mapView == null ) 31 31 return null; 32 List<ImageryLayer> layers = Main. map.mapView.getLayersOfType(ImageryLayer.class);32 List<ImageryLayer> layers = Main.getLayerManager().getLayersOfType(ImageryLayer.class); 33 33 for( ImageryLayer layer : layers ) { 34 34 String url = layer.getInfo().getUrl(); -
applications/editors/josm/plugins/imageryadjust/build.xml
r31923 r32329 2 2 <project name="imageryadjust" default="dist" basedir="."> 3 3 <property name="commit.message" value="ImageryAdjust: Adjust while holding shortcut key"/> 4 <property name="plugin.main.version" value=" 7001"/>4 <property name="plugin.main.version" value="10279"/> 5 5 6 6 <property name="plugin.author" value="Upliner"/> -
applications/editors/josm/plugins/imageryadjust/src/imageryadjust/ImageryAdjustMapMode.java
r31690 r32329 54 54 55 55 private List<? extends Layer> getVisibleLayers() { 56 List<? extends Layer> all = new ArrayList<Layer>(Main. map.mapView.getLayersOfType(ImageryLayer.class));56 List<? extends Layer> all = new ArrayList<Layer>(Main.getLayerManager().getLayersOfType(ImageryLayer.class)); 57 57 Iterator<? extends Layer> it = all.iterator(); 58 58 while (it.hasNext()) { … … 76 76 return; 77 77 } 78 List<ImageryLayer> layers = Main. map.mapView.getLayersOfType(ImageryLayer.class);78 List<ImageryLayer> layers = Main.getLayerManager().getLayersOfType(ImageryLayer.class); 79 79 if (layers.size() == 1) { 80 80 adjustingLayer = layers.get(0); … … 159 159 if (Main.map.mapView == null) 160 160 return false; 161 return Main. map.mapView.getActiveLayer() == layer;161 return Main.getLayerManager().getActiveLayer() == layer; 162 162 } 163 163 … … 230 230 if (Main.map == null) return false; 231 231 if (Main.map.mapView == null) return false; 232 boolean b = ! Main. map.mapView.getLayersOfType(ImageryLayer.class).isEmpty();232 boolean b = ! Main.getLayerManager().getLayersOfType(ImageryLayer.class).isEmpty(); 233 233 return b; 234 234 } -
applications/editors/josm/plugins/irsrectify/build.xml
r32306 r32329 5 5 <property name="commit.message" value="irsrectify shortcut conflict"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value=" 7001"/>7 <property name="plugin.main.version" value="10279"/> 8 8 9 9 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/irsrectify/src/irsrectify/IRSRectifyPlugin.java
r27852 r32329 74 74 data.data.addPrimitive(way); 75 75 data.data.setSelected(way.getPrimitiveId()); 76 frame.mapView.setActiveLayer(data);76 Main.getLayerManager().setActiveLayer(data); 77 77 } 78 78 … … 80 80 if( frame == null || frame.mapView == null ) 81 81 return null; 82 for( Layer l : frame.mapView.getAllLayers() )82 for( Layer l : Main.getLayerManager().getLayers() ) 83 83 if( l instanceof ImageryLayer ) 84 84 return (ImageryLayer)l; … … 90 90 return null; 91 91 92 OsmDataLayer l = frame.mapView.getEditLayer();92 OsmDataLayer l = Main.getLayerManager().getEditLayer(); 93 93 if( isOffsetLayer(l) ) 94 94 return l; 95 95 96 96 // try to find among all layers 97 for( Layer layer : frame.mapView.getAllLayers() )97 for( Layer layer : Main.getLayerManager().getLayers() ) 98 98 if( layer instanceof OsmDataLayer && isOffsetLayer((OsmDataLayer)layer) ) 99 99 return (OsmDataLayer) layer; -
applications/editors/josm/plugins/junctionchecking/build.xml
r31926 r32329 3 3 <property name="commit.message" value="Changed the constructor signature of the plugin main class"/> 4 4 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 5 <property name="plugin.main.version" value=" 7575"/>5 <property name="plugin.main.version" value="10279"/> 6 6 7 7 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/DigraphCreationTask.java
r30725 r32329 65 65 //Prüfen, ob der ausgewählte Layer ein OSMDataLayer ist 66 66 if (Main.map == null 67 || !Main.map.isVisible() || !(Main. map.mapView.getActiveLayer() instanceof OsmDataLayer)) {67 || !Main.map.isVisible() || !(Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer)) { 68 68 JOptionPane.showMessageDialog(Main.parent, tr("this layer is no osm data layer")); 69 69 return; … … 84 84 OSMGraph graph = new OSMGraph(); 85 85 //Der vom Benutzer in JOSM ausgewählte, zur Zeit aktive Layer wird der PLugin-OSM-Layer 86 plugin.setOsmlayer((OsmDataLayer)Main. map.mapView.getActiveLayer());86 plugin.setOsmlayer((OsmDataLayer)Main.getLayerManager().getActiveLayer()); 87 87 Iterator<Node> it = Main.main.getCurrentDataSet().getNodes().iterator(); 88 88 while (it.hasNext()) { … … 147 147 Main.map.selectMapMode(plugin.getJcMapMode()); 148 148 Main.main.addLayer(plugin.getChannelDigraphLayer()); 149 Main. map.mapView.setActiveLayer(plugin.getChannelDigraphLayer());149 Main.getLayerManager().setActiveLayer(plugin.getChannelDigraphLayer()); 150 150 } 151 151 } -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java
r30737 r32329 91 91 plugin.getChannelDigraph().addJunctioncandidateChannel(jc.getSubJunction().get(i)); 92 92 } 93 Main. map.mapView.setActiveLayer(plugin.getChannelDigraphLayer());93 Main.getLayerManager().setActiveLayer(plugin.getChannelDigraphLayer()); 94 94 } 95 95 } -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/util/RelationProducer.java
r30737 r32329 42 42 } 43 43 } 44 Main. map.mapView.setActiveLayer(plugin.getOsmlayer());44 Main.getLayerManager().setActiveLayer(plugin.getOsmlayer()); 45 45 plugin.getOsmlayer().data.setSelected(ways); 46 46 -
applications/editors/josm/plugins/mapdust/build.xml
r31923 r32329 3 3 <!-- properties --> 4 4 <property name="commit.message" value="MapDust bug reporter plugin"/> 5 <property name="plugin.main.version" value=" 7001"/>5 <property name="plugin.main.version" value="10279"/> 6 6 <property name="apidoc.dir" value="doc"/> 7 7 -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java
r30737 r32329 363 363 if (event.getButton() == MouseEvent.BUTTON1) { 364 364 if (event.getClickCount() == 2 && !event.isConsumed()) { 365 if (Main. map.mapView.getActiveLayer() == getMapdustLayer()) {365 if (Main.getLayerManager().getActiveLayer() == getMapdustLayer()) { 366 366 /* show add bug dialog */ 367 367 MapdustBug bug = mapdustGUI.getSelectedBug(); … … 620 620 */ 621 621 private boolean containsMapdustLayer() { 622 boolean contains = false; 623 List<Layer> all = Main.map.mapView.getAllLayersAsList(); 624 if (mapdustLayer != null && all.contains(mapdustLayer)) { 625 contains = true; 626 } 627 return contains; 622 return mapdustLayer != null && Main.getLayerManager().containsLayer(mapdustLayer); 628 623 } 629 624 -
applications/editors/josm/plugins/mapillary/gradle.properties
r32285 r32329 5 5 plugin.icon=images/icon24.png 6 6 plugin.link=https://wiki.openstreetmap.org/wiki/JOSM/Plugins/Mapillary 7 plugin.main.version= 84337 plugin.main.version=10279 8 8 plugin.requires=apache-commons;apache-http 9 9 plugin.version=1.1.5 -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java
r32078 r32329 111 111 MapView.addEditLayerChangeListener(this, false); 112 112 MapView.addLayerChangeListener(this); 113 if (Main. map.mapView.getEditLayer() != null)114 Main. map.mapView.getEditLayer().data.addDataSetListener(this);113 if (Main.getLayerManager().getEditLayer() != null) 114 Main.getLayerManager().getEditLayer().data.addDataSetListener(this); 115 115 if (MapillaryDownloader.getMode() == MapillaryDownloader.MODES.Automatic) 116 116 MapillaryDownloader.automaticDownload(); … … 223 223 Main.map.mapView.removeMouseMotionListener(this.mode); 224 224 MapView.removeEditLayerChangeListener(this); 225 if (Main. map.mapView.getEditLayer() != null)226 Main. map.mapView.getEditLayer().data.removeDataSetListener(this);225 if (Main.getLayerManager().getEditLayer() != null) 226 Main.getLayerManager().getEditLayer().data.removeDataSetListener(this); 227 227 clearInstance(); 228 228 super.destroy(); … … 286 286 public synchronized void paint(final Graphics2D g, final MapView mv, final Bounds box) { 287 287 g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); 288 if (Main. map.mapView.getActiveLayer() == this) {288 if (Main.getLayerManager().getActiveLayer() == this) { 289 289 // paint remainder 290 290 g.setPaint(this.hatched); … … 323 323 selectedImageKey = selectedImage.getSequence().getKey(); 324 324 } 325 g.setStroke(new BasicStroke(this == Main. map.mapView.getActiveLayer() ? 3 : 2));325 g.setStroke(new BasicStroke(this == Main.getLayerManager().getActiveLayer() ? 3 : 2)); 326 326 for (MapillarySequence seq : getData().getSequences()) { 327 327 if (selectedImageKey != null && selectedImageKey.equals(seq.getKey())) { -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadAction.java
r31973 r32329 48 48 } 49 49 // Successive calls to this action toggle the active layer between the OSM data layer and the mapillary layer 50 Main. map.mapView.setActiveLayer(51 Main. map.mapView.getActiveLayer() == MapillaryLayer.getInstance()52 ? Main. map.mapView.getEditLayer()50 Main.getLayerManager().setActiveLayer( 51 Main.getLayerManager().getActiveLayer() == MapillaryLayer.getInstance() 52 ? Main.getLayerManager().getEditLayer() 53 53 : MapillaryLayer.getInstance() 54 54 ); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryDownloader.java
r32064 r32329 152 152 public static void automaticDownload() { 153 153 MapillaryLayer layer = MapillaryLayer.getInstance(); 154 if (Main. map.mapView.getEditLayer() == null)154 if (Main.getLayerManager().getEditLayer() == null) 155 155 return; 156 156 if (isAreaTooBig()) { … … 160 160 if (getMode() != MODES.Automatic) 161 161 throw new IllegalStateException("Must be in automatic mode."); 162 for (Bounds bounds : Main. map.mapView.getEditLayer().data162 for (Bounds bounds : Main.getLayerManager().getEditLayer().data 163 163 .getDataSourceBounds()) { 164 164 if (!layer.getData().getBounds().contains(bounds)) { … … 177 177 private static boolean isAreaTooBig() { 178 178 double area = 0; 179 for (Bounds bounds : Main. map.mapView.getEditLayer().data.getDataSourceBounds()) {179 for (Bounds bounds : Main.getLayerManager().getEditLayer().data.getDataSourceBounds()) { 180 180 area += bounds.getArea(); 181 181 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/mode/JoinMode.java
r31974 r32329 71 71 public void mouseMoved(MouseEvent e) { 72 72 this.lastPos = e; 73 if (!(Main. map.mapView.getActiveLayer() instanceof MapillaryLayer))73 if (!(Main.getLayerManager().getActiveLayer() instanceof MapillaryLayer)) 74 74 return; 75 75 MapillaryAbstractImage closestTemp = getClosest(e.getPoint()); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/mode/SelectMode.java
r32199 r32329 52 52 return; 53 53 MapillaryAbstractImage closest = getClosest(e.getPoint()); 54 if (!(Main. map.mapView.getActiveLayer() instanceof MapillaryLayer)54 if (!(Main.getLayerManager().getActiveLayer() instanceof MapillaryLayer) 55 55 && closest != null && Main.map.mapMode == Main.map.mapModeSelect) { 56 56 this.lastClicked = this.closest; 57 57 this.data.setSelectedImage(closest); 58 58 return; 59 } else if (Main. map.mapView.getActiveLayer() != MapillaryLayer59 } else if (Main.getLayerManager().getActiveLayer() != MapillaryLayer 60 60 .getInstance()) 61 61 return; … … 98 98 @Override 99 99 public void mouseDragged(MouseEvent e) { 100 if (Main. map.mapView.getActiveLayer() != MapillaryLayer.getInstance()) {100 if (Main.getLayerManager().getActiveLayer() != MapillaryLayer.getInstance()) { 101 101 return; 102 102 } … … 156 156 @Override 157 157 public void mouseMoved(MouseEvent e) { 158 if (Main. map.mapView.getActiveLayer() instanceof OsmDataLayer158 if (Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer 159 159 && Main.map.mapMode != Main.map.mapModeSelect) { 160 160 return; … … 167 167 168 168 if (closestTemp != null 169 && Main. map.mapView.getActiveLayer() instanceof OsmDataLayer169 && Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer 170 170 && !this.imageHighlighted) { 171 171 Main.map.mapMode.putValue("active", Boolean.FALSE); … … 173 173 174 174 } else if (closestTemp == null 175 && Main. map.mapView.getActiveLayer() instanceof OsmDataLayer175 && Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer 176 176 && this.imageHighlighted && this.nothingHighlighted) { 177 177 this.nothingHighlighted = false; … … 179 179 180 180 } else if (this.imageHighlighted && !this.nothingHighlighted 181 && Main. map.mapView.getEditLayer().data != null182 && Main. map.mapView.getActiveLayer() instanceof OsmDataLayer) {183 184 for (OsmPrimitive primivitive : Main. map.mapView.getEditLayer().data181 && Main.getLayerManager().getEditLayer().data != null 182 && Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer) { 183 184 for (OsmPrimitive primivitive : Main.getLayerManager().getEditLayer().data 185 185 .allPrimitives()) { 186 186 primivitive.setHighlighted(false); -
applications/editors/josm/plugins/photoadjust/build.xml
r32015 r32329 5 5 <property name="commit.message" value="Commit message"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value=" 9416"/>7 <property name="plugin.main.version" value="10279"/> 8 8 9 9 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustMapMode.java
r31962 r32329 133 133 // GeoImageLayer. GeoImageLayer's are handled by the plug-in 134 134 // directly. 135 if (! (Main. map.mapView.getActiveLayer() instanceof GeoImageLayer)) {135 if (! (Main.getLayerManager().getActiveLayer() instanceof GeoImageLayer)) { 136 136 activateMode(); 137 137 } … … 208 208 private boolean hasLayersToAdjust() { 209 209 if (Main.map == null || Main.map.mapView == null) return false; 210 return ! Main. map.mapView.getLayersOfType(GeoImageLayer.class).isEmpty();210 return ! Main.getLayerManager().getLayersOfType(GeoImageLayer.class).isEmpty(); 211 211 } 212 212 … … 217 217 */ 218 218 private List<GeoImageLayer> getVisibleGeoImageLayers() { 219 List<GeoImageLayer> all = new ArrayList<>(Main. map.mapView.getLayersOfType(GeoImageLayer.class));219 List<GeoImageLayer> all = new ArrayList<>(Main.getLayerManager().getLayersOfType(GeoImageLayer.class)); 220 220 Iterator<GeoImageLayer> it = all.iterator(); 221 221 while (it.hasNext()) { -
applications/editors/josm/plugins/piclayer/build.xml
r31926 r32329 3 3 <property name="commit.message" value="[josm/PicLayer] - #12045 add ability to localize dialog titles"/> 4 4 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 5 <property name="plugin.main.version" value=" 7817"/>5 <property name="plugin.main.version" value="10279"/> 6 6 7 7 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java
r31729 r32329 158 158 new SavePictureCalibrationAction((PicLayerAbstract) arg0).actionPerformed(null); 159 159 } 160 // Why should I do all these checks now? 161 boolean enable = Main.map != null && Main.map.mapView != null && Main.map.mapView.getAllLayers() != null && Main.map.mapView.getAllLayers().size() != 0; 160 boolean enable = !Main.getLayerManager().getLayers().isEmpty(); 162 161 newLayerFromFileAction.setEnabled(enable); 163 162 newLayerFromClipboardAction.setEnabled(enable); -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/GenericPicTransformAction.java
r30356 r32329 57 57 public void mousePressed(MouseEvent e) { 58 58 // Start action 59 if ( Main. map.mapView.getActiveLayer() instanceof PicLayerAbstract ) {60 currentLayer = (PicLayerAbstract)Main. map.mapView.getActiveLayer();59 if ( Main.getLayerManager().getActiveLayer() instanceof PicLayerAbstract ) { 60 currentLayer = (PicLayerAbstract)Main.getLayerManager().getActiveLayer(); 61 61 62 62 if ( currentLayer != null && e.getButton() == MouseEvent.BUTTON1 ) { … … 99 99 100 100 protected void updateDrawPoints(boolean value) { 101 Layer active = Main. map.mapView.getActiveLayer();101 Layer active = Main.getLayerManager().getActiveLayer(); 102 102 if (active instanceof PicLayerAbstract) { 103 103 ((PicLayerAbstract)active).setDrawPoints(value); -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromFileAction.java
r31729 r32329 119 119 // or at the bottom of the stack if there is no such layer yet 120 120 // The next layers we load will be placed one after the other after this first layer 121 int newLayerPos = Main. map.mapView.getAllLayers().size();122 for(Layer l : Main. map.mapView.getLayersOfType(PicLayerAbstract.class)) {121 int newLayerPos = Main.getLayerManager().getLayers().size(); 122 for(Layer l : Main.getLayerManager().getLayersOfType(PicLayerAbstract.class)) { 123 123 int pos = Main.map.mapView.getLayerPos(l); 124 124 if (pos < newLayerPos) newLayerPos = pos; -
applications/editors/josm/plugins/rasterfilters/.project
r32286 r32329 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <projectDescription> 3 <name> rasterfilters</name>3 <name>JOSM-rasterfilters</name> 4 4 <comment>JavaCC Nature</comment> 5 5 <projects> -
applications/editors/josm/plugins/rasterfilters/build.xml
r31504 r32329 10 10 11 11 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 12 <property name="plugin.main.version" value=" 8625" />12 <property name="plugin.main.version" value="10279" /> 13 13 <property name="plugin.version" value="1.0.1"/> 14 14 -
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/RasterFiltersPlugin.java
r31635 r32329 119 119 } 120 120 121 if (Main. map.mapView.getAllLayersAsList().size() == 0) {121 if (Main.getLayerManager().getLayers().isEmpty()) { 122 122 123 123 Container container = filterButton.getParent(); -
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/actions/ShowLayerFiltersDialog.java
r32146 r32329 51 51 public void actionPerformed(ActionEvent e) { 52 52 53 Layer layer = Main. map.mapView.getActiveLayer();53 Layer layer = Main.getLayerManager().getActiveLayer(); 54 54 55 55 if (layer instanceof ImageryLayer) { -
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/model/FiltersManager.java
r31947 r32329 131 131 132 132 filter.changeFilterState(filterState.encodeJson()); 133 Main. map.mapView.getActiveLayer().setFilterStateChanged();133 Main.getLayerManager().getActiveLayer().setFilterStateChanged(); 134 134 135 135 fp.createBottomPanel(this); … … 155 155 filtersMap.get(filterId).changeFilterState(filterState.encodeJson()); 156 156 157 if (Main. map.mapView.getActiveLayer() != null) {158 Main. map.mapView.getActiveLayer().setFilterStateChanged();157 if (Main.getLayerManager().getActiveLayer() != null) { 158 Main.getLayerManager().getActiveLayer().setFilterStateChanged(); 159 159 } 160 160 … … 239 239 } 240 240 241 Main. map.mapView.getActiveLayer().setFilterStateChanged();241 Main.getLayerManager().getActiveLayer().setFilterStateChanged(); 242 242 243 243 } … … 255 255 disabledFilters.add(filtersMap.get(filterId)); 256 256 257 Main. map.mapView.getActiveLayer().setFilterStateChanged();257 Main.getLayerManager().getActiveLayer().setFilterStateChanged(); 258 258 259 259 } else { … … 262 262 disabledFilters.remove(filtersMap.get(filterId)); 263 263 264 Main. map.mapView.getActiveLayer().setFilterStateChanged();264 Main.getLayerManager().getActiveLayer().setFilterStateChanged(); 265 265 266 266 } -
applications/editors/josm/plugins/routes/build.xml
r32310 r32329 2 2 <project name="routes" default="dist" basedir="."> 3 3 <property name="commit.message" value="Changed the constructor signature of the plugin main class"/> 4 <property name="plugin.main.version" value=" 8811"/>4 <property name="plugin.main.version" value="10279"/> 5 5 <property name="josm" location="../../core/dist/josm-custom.jar"/> 6 6 <property name="plugin.dist.dir" value="../../dist"/> -
applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RoutesPlugin.java
r30738 r32329 79 79 private void checkLayers() { 80 80 if (Main.map != null && Main.map.mapView != null) { 81 for (Layer layer:Main. map.mapView.getAllLayers()) {81 for (Layer layer:Main.getLayerManager().getLayers()) { 82 82 if (layer instanceof OsmDataLayer) { 83 83 if (!isShown) { -
applications/editors/josm/plugins/routing/build.xml
r31926 r32329 5 5 <property name="commit.message" value="added one-way support in roundabouts"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value=" 7001"/>7 <property name="plugin.main.version" value="10279"/> 8 8 9 9 <!-- -
applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java
r30737 r32329 350 350 Graph<Node,OsmEdge> g; 351 351 double totalWeight = 0; 352 RoutingLayer layer = (RoutingLayer)Main. map.mapView.getActiveLayer();352 RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer(); 353 353 RoutingModel routingModel = layer.getRoutingModel(); 354 354 -
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/AddRouteNodeAction.java
r29586 r32329 83 83 // Search for nearest highway node 84 84 Node node = null; 85 if (Main. map.mapView.getActiveLayer() instanceof RoutingLayer) {86 RoutingLayer layer = (RoutingLayer)Main. map.mapView.getActiveLayer();85 if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) { 86 RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer(); 87 87 node = layer.getNearestHighwayNode(e.getPoint()); 88 88 if(node == null) { -
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/MoveRouteNodeAction.java
r29595 r32329 96 96 // If left button is pressed 97 97 if (e.getButton() == MouseEvent.BUTTON1) { 98 if (Main. map.mapView.getActiveLayer() instanceof RoutingLayer) {98 if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) { 99 99 requestFocusInMapView(); 100 RoutingLayer layer = (RoutingLayer)Main. map.mapView.getActiveLayer();100 RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer(); 101 101 RoutingModel routingModel = layer.getRoutingModel(); 102 102 // Search for the nearest node in the list … … 129 129 130 130 private void searchAndReplaceNode(Point point) { 131 if (Main. map.mapView.getActiveLayer() instanceof RoutingLayer) {132 RoutingLayer layer = (RoutingLayer)Main. map.mapView.getActiveLayer();131 if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) { 132 RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer(); 133 133 RoutingModel routingModel = layer.getRoutingModel(); 134 134 RoutingDialog routingDialog = RoutingPlugin.getInstance().getRoutingDialog(); -
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/RemoveRouteNodeAction.java
r29586 r32329 84 84 // If left button is clicked 85 85 if (e.getButton() == MouseEvent.BUTTON1) { 86 if (Main. map.mapView.getActiveLayer() instanceof RoutingLayer) {87 RoutingLayer layer = (RoutingLayer)Main. map.mapView.getActiveLayer();86 if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) { 87 RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer(); 88 88 RoutingModel routingModel = layer.getRoutingModel(); 89 89 // Search for the nearest node in the list -
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingDialog.java
r30532 r32329 131 131 public void refresh() { 132 132 clearNodes(); 133 if (Main. map.mapView.getActiveLayer() instanceof RoutingLayer) {134 RoutingLayer routingLayer = (RoutingLayer)Main. map.mapView.getActiveLayer();133 if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) { 134 RoutingLayer routingLayer = (RoutingLayer)Main.getLayerManager().getActiveLayer(); 135 135 RoutingModel routingModel = routingLayer.getRoutingModel(); 136 136 for (Node n : routingModel.getSelectedNodes()) { -
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingMenu.java
r31646 r32329 93 93 rshorter.addItemListener(new ItemListener() { 94 94 public void itemStateChanged(ItemEvent e) { 95 if (Main. map.mapView.getActiveLayer() instanceof RoutingLayer) {96 RoutingLayer layer = (RoutingLayer)Main. map.mapView.getActiveLayer();95 if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) { 96 RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer(); 97 97 RoutingModel routingModel = layer.getRoutingModel(); 98 98 if (e.getStateChange()==ItemEvent.SELECTED) { … … 122 122 cbmi.addItemListener(new ItemListener() { 123 123 public void itemStateChanged(ItemEvent e) { 124 if (Main. map.mapView.getActiveLayer() instanceof RoutingLayer) {125 RoutingLayer layer = (RoutingLayer)Main. map.mapView.getActiveLayer();124 if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) { 125 RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer(); 126 126 RoutingModel routingModel = layer.getRoutingModel(); 127 127 if (e.getStateChange()==ItemEvent.SELECTED) … … 142 142 reverseMI.addActionListener(new ActionListener() { 143 143 public void actionPerformed(ActionEvent e) { 144 if (Main. map.mapView.getActiveLayer() instanceof RoutingLayer) {145 RoutingLayer layer = (RoutingLayer)Main. map.mapView.getActiveLayer();144 if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) { 145 RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer(); 146 146 RoutingModel routingModel = layer.getRoutingModel(); 147 147 routingModel.reverseNodes(); … … 155 155 clearMI.addActionListener(new ActionListener() { 156 156 public void actionPerformed(ActionEvent e) { 157 if (Main. map.mapView.getActiveLayer() instanceof RoutingLayer) {158 RoutingLayer layer = (RoutingLayer)Main. map.mapView.getActiveLayer();157 if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) { 158 RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer(); 159 159 RoutingModel routingModel = layer.getRoutingModel(); 160 160 // Reset routing nodes and paths … … 171 171 public void actionPerformed(ActionEvent e) { 172 172 173 if (Main. map.mapView.getActiveLayer() instanceof RoutingLayer) {174 RoutingLayer layer = (RoutingLayer)Main. map.mapView.getActiveLayer();173 if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) { 174 RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer(); 175 175 RoutingModel routingModel = layer.getRoutingModel(); 176 176 routingModel.routingGraph.resetGraph(); -
applications/editors/josm/plugins/sds/build.xml
r31768 r32329 5 5 <property name="commit.message" value=""/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value=" 8415"/>7 <property name="plugin.main.version" value="10279"/> 8 8 9 9 <!-- -
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsMenu.java
r31646 r32329 55 55 56 56 void setEnabledState() { 57 boolean en = (Main.map != null) && (Main.map.mapView != null) && (Main.map.mapView.getActiveLayer() instanceof OsmDataLayer);57 boolean en = Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer; 58 58 loadItem.setEnabled(en); 59 59 saveItem.setEnabled(en); -
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsSaveAction.java
r30738 r32329 37 37 public boolean doSave() { 38 38 Layer layer = null; 39 if (Main. isDisplayingMapView() && (Main.map.mapView.getActiveLayer() instanceof OsmDataLayer))40 layer = Main. map.mapView.getActiveLayer();39 if (Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer) 40 layer = Main.getLayerManager().getActiveLayer(); 41 41 42 42 if (layer == null) -
applications/editors/josm/plugins/surveyor/build.xml
r31926 r32329 7 7 <property name="commit.message" value="Changed the constructor signature of the plugin main class"/> 8 8 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 9 <property name="plugin.main.version" value=" 8863"/>9 <property name="plugin.main.version" value="10279"/> 10 10 <property name="livegpsplugin.jar" value="${plugin.dist.dir}/livegps.jar"/> 11 11 -
applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetWaypointAction.java
r30646 r32329 125 125 public GpxLayer getGpxLayer() { 126 126 if(liveGpsLayer == null) { 127 Collection<Layer> layers = Main. map.mapView.getAllLayers();127 Collection<Layer> layers = Main.getLayerManager().getLayers(); 128 128 for (Layer layer : layers) { 129 129 if(layer instanceof LiveGpsLayer) { -
applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/util/LayerUtil.java
r17384 r32329 24 24 Layer result = null; 25 25 if(Main.map != null && Main.map.mapView != null) { 26 for(Layer layer : Main. map.mapView.getAllLayers()) {26 for(Layer layer : Main.getLayerManager().getLayers()) { 27 27 if(layerName.equals(layer.getName()) && layerType.isAssignableFrom(layer.getClass())) { 28 28 result = layer; -
applications/editors/josm/plugins/turnrestrictions/build.xml
r31926 r32329 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=" 8863"/>6 <property name="plugin.main.version" value="10279"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java
r30737 r32329 819 819 public void actionPerformed(ActionEvent e) { 820 820 if (Main.main.getActiveLayer() != getLayer()){ 821 Main. map.mapView.setActiveLayer(getLayer());821 Main.getLayerManager().setActiveLayer(getLayer()); 822 822 } 823 823 Relation tr = getTurnRestriction(); -
applications/editors/josm/plugins/videomapping/.classpath
r31877 r32329 2 2 <classpath> 3 3 <classpathentry kind="src" path="src"/> 4 <classpathentry kind="src" path="test"/>5 4 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> 6 5 <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/> -
applications/editors/josm/plugins/waypoint_search/build.xml
r30416 r32329 5 5 <property name="commit.message" value="bugfix of search when layer is added"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value=" 7001"/>7 <property name="plugin.main.version" value="10279"/> 8 8 9 9 <property name="plugin.author" value="Åsmund Realfsen - realfsen at gmx.net"/> -
applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/Engine.java
r30777 r32329 18 18 if (gpxLayersExist()) { 19 19 //Loop over marker (waypoint) layers.. it could be more than one 20 for (Iterator<MarkerLayer> it = Main. map.mapView.getLayersOfType(MarkerLayer.class).iterator(); it.hasNext();) {20 for (Iterator<MarkerLayer> it = Main.getLayerManager().getLayersOfType(MarkerLayer.class).iterator(); it.hasNext();) { 21 21 //loop over each marker (waypoint) 22 22 for (Iterator<Marker> markerIterator = it.next().data.iterator(); markerIterator.hasNext();) { … … 32 32 33 33 static boolean gpxLayersExist() { 34 return Main.map != null && Main.map.mapView.hasLayers() && !Main.map.mapView.getLayersOfType(MarkerLayer.class).isEmpty();34 return !Main.getLayerManager().getLayersOfType(MarkerLayer.class).isEmpty(); 35 35 } 36 36 }
Note:
See TracChangeset
for help on using the changeset viewer.