Changeset 34564 in osm for applications
- Timestamp:
- 2018-08-18T20:33:13+02:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/tracer2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/tracer2/build.xml
r34344 r34564 5 5 <property name="commit.message" value="see #josm11090"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="1 3910"/>7 <property name="plugin.main.version" value="14153"/> 8 8 9 9 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/TracerAction.java
r33700 r34564 21 21 import javax.swing.JOptionPane; 22 22 23 import org.openstreetmap.josm.Main;24 23 import org.openstreetmap.josm.actions.mapmode.MapMode; 25 24 import org.openstreetmap.josm.command.ChangePropertyCommand; 26 25 import org.openstreetmap.josm.command.Command; 27 26 import org.openstreetmap.josm.command.SequenceCommand; 27 import org.openstreetmap.josm.data.UndoRedoHandler; 28 28 import org.openstreetmap.josm.data.coor.LatLon; 29 29 import org.openstreetmap.josm.data.osm.Node; … … 99 99 100 100 if (!commands.isEmpty()) { 101 Main.main.undoRedo.add(new SequenceCommand(tr("Change tag {0} to {1}", strTag, strTagValue), commands));101 UndoRedoHandler.getInstance().add(new SequenceCommand(tr("Change tag {0} to {1}", strTag, strTagValue), commands)); 102 102 } 103 103 } … … 206 206 } 207 207 if (oGetVersion.m_nVersionMajor != nMajor) { 208 JOptionPane.showMessageDialog(Main .parent,208 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), 209 209 tr("The Tracer2Server version isn''t compatible with this plugin. Please download version {0} from\n{1}.", nMajor + ".x", 210 210 "http://sourceforge.net/projects/tracer2server/"), tr("Error"), JOptionPane.ERROR_MESSAGE); … … 212 212 } 213 213 if (oGetVersion.m_nVersionMinor < nMinor) { 214 JOptionPane.showMessageDialog(Main .parent,214 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), 215 215 tr("New version of Tracer2Server is available. For best results please upgrade to version {0}.", nMajor + "." + nMinor), 216 216 tr("Information"), JOptionPane.INFORMATION_MESSAGE); … … 232 232 if (listEnableParam == null || listEnableParam.size() == 0) { 233 233 listParam.setActivParam(null); 234 JOptionPane.showMessageDialog(Main .parent, tr("No set of parameter is active!"), tr("Error"), JOptionPane.ERROR_MESSAGE);234 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("No set of parameter is active!"), tr("Error"), JOptionPane.ERROR_MESSAGE); 235 235 return false; 236 236 } … … 246 246 if (dialog.getShow()) { 247 247 JOptionPane pane = new JOptionPane(dialog, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION); 248 JDialog dlg = pane.createDialog(Main .parent, tr("Tracer2") + " - " + tr("Select parameter"));248 JDialog dlg = pane.createDialog(MainApplication.getMainFrame(), tr("Tracer2") + " - " + tr("Select parameter")); 249 249 dlg.setVisible(true); 250 250 Object obj = pane.getValue(); … … 320 320 strCommand = tr("Tracer2: modify way to {0} points", coordList.size()); 321 321 } 322 Main.main.undoRedo.add(new SequenceCommand(strCommand, commands));322 UndoRedoHandler.getInstance().add(new SequenceCommand(strCommand, commands)); 323 323 324 324 if (m_bShift) { -
applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/preferences/ServerParam.java
r32788 r34564 13 13 import javax.swing.SwingUtilities; 14 14 15 import org.openstreetmap.josm. Main;15 import org.openstreetmap.josm.gui.MainApplication; 16 16 import org.openstreetmap.josm.gui.widgets.JMultilineLabel; 17 17 import org.openstreetmap.josm.tools.GBC; … … 204 204 @Override 205 205 public void run() { 206 JOptionPane.showMessageDialog(Main .parent, p, tr("Tracer2 error"), JOptionPane.ERROR_MESSAGE);206 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), p, tr("Tracer2 error"), JOptionPane.ERROR_MESSAGE); 207 207 } 208 208 }); -
applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/preferences/ServerParamDialog.java
r32788 r34564 18 18 import javax.swing.JTextField; 19 19 20 import org.openstreetmap.josm.Main;21 20 import org.openstreetmap.josm.gui.ExtendedDialog; 21 import org.openstreetmap.josm.gui.MainApplication; 22 22 import org.openstreetmap.josm.tools.GBC; 23 23 … … 111 111 112 112 public ServerParamDialog(ServerParam param) { 113 super(Main .parent, tr("Tracer2") + " - " + tr("Parameter for server request"),113 super(MainApplication.getMainFrame(), tr("Tracer2") + " - " + tr("Parameter for server request"), 114 114 new String[] {tr("OK"), tr("Cancel")}, 115 115 true); -
applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/preferences/ServerParamPanel.java
r32788 r34564 16 16 import javax.swing.JPanel; 17 17 18 import org.openstreetmap.josm. Main;18 import org.openstreetmap.josm.gui.MainApplication; 19 19 20 20 public class ServerParamPanel extends JPanel { … … 74 74 @Override 75 75 public void actionPerformed(ActionEvent arg0) { 76 if (JOptionPane.showConfirmDialog(Main .parent,76 if (JOptionPane.showConfirmDialog(MainApplication.getMainFrame(), 77 77 tr("Delete parameter \"{0}\"?", param.getName()), 78 78 tr("Are you sure?"), … … 123 123 if (dialog.getShow()) { 124 124 JOptionPane pane = new JOptionPane(dialog, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION); 125 JDialog dlg = pane.createDialog(Main .parent, tr("Tracer2") + " - " + tr("Select predefined parameter"));125 JDialog dlg = pane.createDialog(MainApplication.getMainFrame(), tr("Tracer2") + " - " + tr("Select predefined parameter")); 126 126 dlg.setVisible(true); 127 127 Object obj = pane.getValue(); -
applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/server/Request.java
r34344 r34564 9 9 import javax.swing.JOptionPane; 10 10 11 import org.openstreetmap.josm. Main;11 import org.openstreetmap.josm.gui.MainApplication; 12 12 import org.openstreetmap.josm.tools.HttpClient; 13 13 … … 28 28 return HttpClient.create(new URL(URL + strUrl)).connect().fetchContent(); 29 29 } catch (IOException e) { 30 JOptionPane.showMessageDialog(Main .parent,30 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), 31 31 tr("Tracer2Server isn''t running. Please start the Server.\nIf you don''t have the server, please download it from\n{0}.", 32 32 "http://sourceforge.net/projects/tracer2server/"), tr("Error"), JOptionPane.ERROR_MESSAGE); 33 33 return ""; 34 34 } catch (Exception e) { 35 JOptionPane.showMessageDialog(Main .parent, tr("Tracer2Server hasn''t found anything.") + "\n",35 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Tracer2Server hasn''t found anything.") + "\n", 36 36 tr("Error"), JOptionPane.ERROR_MESSAGE); 37 37 return ""; … … 48 48 if (strResponse.contains(strIdentifier)) { 49 49 String strError = strResponse.replaceFirst(strIdentifier, "").trim(); 50 JOptionPane.showMessageDialog(Main .parent, tr("Tracer2Server has detected an error.") + "\n" + strError,50 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Tracer2Server has detected an error.") + "\n" + strError, 51 51 tr("Error"), JOptionPane.ERROR_MESSAGE); 52 52 return true;
Note:
See TracChangeset
for help on using the changeset viewer.