Changeset 33852 in osm for applications/editors/josm/plugins/DirectUpload/src
- Timestamp:
- 2017-11-21T01:46:18+01:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/DirectUpload
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/DirectUpload
- Property svn:ignore
-
old new 5 5 checkstyle-josm-DirectUpload.xml 6 6 findbugs-josm-DirectUpload.xml 7 spotbugs-josm-DirectUpload.xml
-
- Property svn:ignore
-
applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java
r31949 r33852 32 32 import org.openstreetmap.josm.data.gpx.GpxTrack; 33 33 import org.openstreetmap.josm.gui.ExtendedDialog; 34 import org.openstreetmap.josm.gui.MainApplication; 34 35 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 35 36 import org.openstreetmap.josm.gui.progress.ProgressMonitor; … … 140 141 descriptionField.setToolTipText(tr("Please enter Description about your trace.")); 141 142 142 List<String> descHistory = new LinkedList<>(Main.pref.get Collection("directupload.description.history", new LinkedList<String>()));143 List<String> descHistory = new LinkedList<>(Main.pref.getList("directupload.description.history", new LinkedList<String>())); 143 144 // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement() 144 145 // XXX this should be handled in HistoryComboBox … … 151 152 tagsField.setToolTipText(tr("Please enter tags about your trace.")); 152 153 153 List<String> tagsHistory = new LinkedList<>(Main.pref.get Collection("directupload.tags.history", new LinkedList<String>()));154 List<String> tagsHistory = new LinkedList<>(Main.pref.getList("directupload.tags.history", new LinkedList<String>())); 154 155 // we have to reverse the history, because ComboBoxHistory will reverse it againin addElement() 155 156 // XXX this should be handled in HistoryComboBox … … 422 423 423 424 descriptionField.addCurrentItemToHistory(); 424 Main.pref.put Collection("directupload.description.history", descriptionField.getHistory());425 Main.pref.putList("directupload.description.history", descriptionField.getHistory()); 425 426 426 427 tagsField.addCurrentItemToHistory(); 427 Main.pref.put Collection("directupload.tags.history", tagsField.getHistory());428 Main.pref.putList("directupload.tags.history", tagsField.getHistory()); 428 429 429 430 PleaseWaitRunnable uploadTask = new PleaseWaitRunnable(tr("Uploading GPX Track")){ … … 442 443 }; 443 444 444 Main .worker.execute(uploadTask);445 MainApplication.worker.execute(uploadTask); 445 446 } 446 447 -
applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGuiPlugin.java
r29866 r33852 12 12 import java.awt.event.KeyEvent; 13 13 14 import org.openstreetmap.josm.Main;15 14 import org.openstreetmap.josm.actions.JosmAction; 15 import org.openstreetmap.josm.gui.MainApplication; 16 16 import org.openstreetmap.josm.gui.MainMenu; 17 17 import org.openstreetmap.josm.plugins.Plugin; … … 30 30 super(info); 31 31 openaction = new UploadAction(); 32 MainMenu.add(Main .main.menu.gpsMenu, openaction);32 MainMenu.add(MainApplication.getMenu().gpsMenu, openaction); 33 33 } 34 34 35 class UploadAction extends JosmAction {35 static class UploadAction extends JosmAction { 36 36 37 37 public UploadAction(){ … … 41 41 } 42 42 43 @Override 43 44 public void actionPerformed(ActionEvent e) { 44 45 UploadDataGui go = new UploadDataGui(); -
applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadOsmConnection.java
r32329 r33852 7 7 import org.openstreetmap.josm.Main; 8 8 import org.openstreetmap.josm.data.gpx.GpxData; 9 import org.openstreetmap.josm.gui.Ma pView;9 import org.openstreetmap.josm.gui.MainApplication; 10 10 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 11 11 import org.openstreetmap.josm.gui.layer.GpxLayer; … … 49 49 */ 50 50 GpxData autoSelectTrace() { 51 if (Main .map != null && Main.map.mapView != null) {52 MainLayerManager lm = Main .getLayerManager();51 if (MainApplication.getMap() != null && MainApplication.getMap().mapView != null) { 52 MainLayerManager lm = MainApplication.getLayerManager(); 53 53 // List<Layer> allLayers = new ArrayList<Layer>(mv.getAllLayersAsList()); // modifiable 54 54 List<Layer> selectedLayers = LayerListDialog.getInstance().getModel().getSelectedLayers();
Note:
See TracChangeset
for help on using the changeset viewer.