Changeset 33589 in osm
- Timestamp:
- 2017-09-10T21:56:48+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/sds
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/sds/build.xml
r33217 r33589 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="1 1851"/>7 <property name="plugin.main.version" value="12810"/> 8 8 9 9 <!-- -
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/ReadPostprocessor.java
r32703 r33589 11 11 import javax.xml.parsers.SAXParserFactory; 12 12 13 import org.openstreetmap.josm.data.osm.Changeset;14 13 import org.openstreetmap.josm.data.osm.DataSet; 15 14 import org.openstreetmap.josm.data.osm.Node; … … 17 16 import org.openstreetmap.josm.data.osm.Relation; 18 17 import org.openstreetmap.josm.data.osm.Way; 19 import org.openstreetmap.josm.data.osm.visitor. Visitor;18 import org.openstreetmap.josm.data.osm.visitor.OsmPrimitiveVisitor; 20 19 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 21 20 import org.openstreetmap.josm.io.OsmServerReadPostprocessor; … … 42 41 relationList = new ArrayList<>(); 43 42 44 Visitor adder = newVisitor() {43 OsmPrimitiveVisitor adder = new OsmPrimitiveVisitor() { 45 44 @Override 46 45 public void visit(Node n) { … … 60 59 plugin.originalNodes.put(e.getId(), e.save()); 61 60 } 62 63 @Override64 public void visit(Changeset cs) {}65 61 }; 66 62 -
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsApi.java
r32705 r33589 30 30 import org.openstreetmap.josm.io.ProgressInputStream; 31 31 import org.openstreetmap.josm.tools.CheckParameterUtil; 32 import org.openstreetmap.josm.tools.Logging; 32 33 33 34 /** … … 283 284 Thread.sleep(1000); 284 285 } catch (InterruptedException ex) { 285 Main.trace(ex);286 Logging.trace(ex); 286 287 } 287 288 } -
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsConnection.java
r32703 r33589 7 7 import java.util.Base64; 8 8 9 import org.openstreetmap.josm.Main;10 9 import org.openstreetmap.josm.io.auth.CredentialsAgentException; 11 10 import org.openstreetmap.josm.io.auth.CredentialsAgentResponse; 11 import org.openstreetmap.josm.tools.Logging; 12 12 13 13 /** … … 45 45 Thread.sleep(100); 46 46 } catch (InterruptedException ex) { 47 Main.trace(ex);47 Logging.trace(ex); 48 48 } 49 49 -
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsCredentialAgent.java
r32703 r33589 15 15 import org.openstreetmap.josm.data.oauth.OAuthToken; 16 16 import org.openstreetmap.josm.gui.io.CredentialDialog; 17 import org.openstreetmap.josm.gui.preferences.server.ProxyPreferencesPanel;18 17 import org.openstreetmap.josm.gui.widgets.HtmlPanel; 18 import org.openstreetmap.josm.io.DefaultProxySelector; 19 19 import org.openstreetmap.josm.io.auth.AbstractCredentialsAgent; 20 20 import org.openstreetmap.josm.io.auth.CredentialsAgent; … … 46 46 return new PasswordAuthentication(user, password == null ? new char[0] : password.toCharArray()); 47 47 case PROXY: 48 user = Main.pref.get( ProxyPreferencesPanel.PROXY_USER, null);49 password = Main.pref.get( ProxyPreferencesPanel.PROXY_PASS, null);48 user = Main.pref.get(DefaultProxySelector.PROXY_USER, null); 49 password = Main.pref.get(DefaultProxySelector.PROXY_PASS, null); 50 50 if (user == null) 51 51 return null; … … 72 72 break; 73 73 case PROXY: 74 Main.pref.put( ProxyPreferencesPanel.PROXY_USER, credentials.getUserName());74 Main.pref.put(DefaultProxySelector.PROXY_USER, credentials.getUserName()); 75 75 if (credentials.getPassword() == null) { 76 Main.pref.put( ProxyPreferencesPanel.PROXY_PASS, null);76 Main.pref.put(DefaultProxySelector.PROXY_PASS, null); 77 77 } else { 78 Main.pref.put( ProxyPreferencesPanel.PROXY_PASS, String.valueOf(credentials.getPassword()));78 Main.pref.put(DefaultProxySelector.PROXY_PASS, String.valueOf(credentials.getPassword())); 79 79 } 80 80 break; -
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsLoadAction.java
r32703 r33589 17 17 import javax.xml.parsers.SAXParserFactory; 18 18 19 import org.openstreetmap.josm. Main;19 import org.openstreetmap.josm.gui.MainApplication; 20 20 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 21 21 import org.openstreetmap.josm.gui.widgets.SwingFileChooser; … … 45 45 public void openFiles(List<File> fileList) { 46 46 OpenFileTask task = new OpenFileTask(fileList, plugin); 47 Main .worker.submit(task);47 MainApplication.worker.submit(task); 48 48 } 49 49 -
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsMenu.java
r32705 r33589 20 20 import org.openstreetmap.josm.Main; 21 21 import org.openstreetmap.josm.actions.JosmAction; 22 import org.openstreetmap.josm.gui.MainApplication; 22 23 import org.openstreetmap.josm.gui.MainMenu; 23 24 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent; … … 29 30 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 30 31 import org.openstreetmap.josm.gui.preferences.PreferenceDialog; 32 import org.openstreetmap.josm.tools.Logging; 31 33 32 34 @SuppressWarnings("serial") … … 40 42 41 43 public SdsMenu(final SeparateDataStorePlugin thePlugin) { 42 MainMenu mm = Main .main.menu;44 MainMenu mm = MainApplication.getMenu(); 43 45 menu = mm.addMenu("SDS", tr("SDS"), KeyEvent.VK_S, mm.getDefaultMenuPos(), null); 44 46 saveItem = new JMenuItem(new SdsSaveAction()); … … 53 55 menu.add(aboutItem); 54 56 55 Main .getLayerManager().addLayerChangeListener(this);56 Main .getLayerManager().addActiveLayerChangeListener(this);57 MainApplication.getLayerManager().addLayerChangeListener(this); 58 MainApplication.getLayerManager().addActiveLayerChangeListener(this); 57 59 setEnabledState(); 58 60 } 59 61 60 62 void setEnabledState() { 61 boolean en = Main .getLayerManager().getActiveLayer() instanceof OsmDataLayer;63 boolean en = MainApplication.getLayerManager().getActiveLayer() instanceof OsmDataLayer; 62 64 loadItem.setEnabled(en); 63 65 saveItem.setEnabled(en); … … 148 150 sptbn.invoke(pd, "sds"); 149 151 } catch (Exception ex) { 150 Main.trace(ex);152 Logging.trace(ex); 151 153 } 152 154 pd.setVisible(true); -
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsSaveAction.java
r32703 r33589 19 19 import org.openstreetmap.josm.gui.layer.Layer; 20 20 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 21 import org.openstreetmap.josm.tools.Logging; 21 22 import org.openstreetmap.josm.tools.Utils; 22 23 … … 37 38 public boolean doSave() { 38 39 Layer layer = null; 39 if ( Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer)40 layer = Main.getLayerManager().getActiveLayer();40 if (getLayerManager().getActiveLayer() instanceof OsmDataLayer) 41 layer = getLayerManager().getActiveLayer(); 41 42 42 43 if (layer == null) … … 84 85 } 85 86 } catch (IOException e) { 86 Main.error(e);87 Logging.error(e); 87 88 JOptionPane.showMessageDialog( 88 89 Main.parent, … … 99 100 } 100 101 } catch (IOException e2) { 101 Main.error(e2);102 Logging.error(e2); 102 103 JOptionPane.showMessageDialog( 103 104 Main.parent,
Note:
See TracChangeset
for help on using the changeset viewer.