Changeset 16788 in osm for applications/editors/josm
- Timestamp:
- 2009-08-03T11:38:28+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/validator
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/build.xml
r16629 r16788 26 26 <attribute name="Plugin-Description" value="An OSM data validator. It checks for problems in data, and provides fixes for the common ones. Spellcheck integrated for tag names."/> 27 27 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Validator"/> 28 <attribute name="Plugin-Mainversion" value="18 15"/>28 <attribute name="Plugin-Mainversion" value="1893"/> 29 29 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 30 30 </manifest> -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorLayer.java
r16409 r16788 112 112 @Override 113 113 public Component[] getMenuEntries() { 114 return new Component[] { new JMenuItem(new LayerListDialog.ShowHideLayerAction(this)), 115 new JMenuItem(new LayerListDialog.DeleteLayerAction(this)), new JSeparator(), 114 return new Component[] { new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)), 115 new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)), 116 new JSeparator(), 116 117 new JMenuItem(new RenameLayerAction(null, this)), new JSeparator(), 117 118 new JMenuItem(new LayerListPopup.InfoAction(this)) }; -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/GridLayer.java
r16629 r16788 123 123 { 124 124 return new Component[]{ 125 new JMenuItem( new LayerListDialog.ShowHideLayerAction(this)),126 new JMenuItem( new LayerListDialog.DeleteLayerAction(this)),125 new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)), 126 new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)), 127 127 new JSeparator(), 128 128 new JMenuItem(new RenameLayerAction(null, this)), -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java
r16681 r16788 31 31 import org.openstreetmap.josm.data.projection.Mercator; 32 32 import org.openstreetmap.josm.gui.MapFrame; 33 import org.openstreetmap.josm.gui.OptionPaneUtil; 33 34 import org.openstreetmap.josm.gui.layer.Layer; 34 35 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 275 276 } catch (InvocationTargetException ite) { 276 277 ite.getCause().printStackTrace(); 277 JOptionPane.showMessageDialog(null, tr("Error initializing test {0}:\n {1}", test.getClass() 278 .getSimpleName(), ite.getCause().getMessage())); 278 OptionPaneUtil.showMessageDialog(Main.parent, 279 tr("Error initializing test {0}:\n {1}", test.getClass() 280 .getSimpleName(), ite.getCause().getMessage()), 281 tr("Error"), 282 JOptionPane.ERROR_MESSAGE); 279 283 } catch (Exception e) { 280 284 e.printStackTrace(); 281 JOptionPane.showMessageDialog(null, tr("Error initializing test {0}:\n {1}", test.getClass() 282 .getSimpleName(), e)); 285 OptionPaneUtil.showMessageDialog(Main.parent, 286 tr("Error initializing test {0}:\n {1}", test.getClass() 287 .getSimpleName(), e), 288 tr("Error"), 289 JOptionPane.ERROR_MESSAGE); 283 290 } 284 291 } -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateUploadHook.java
r16629 r16788 16 16 import org.openstreetmap.josm.data.osm.DataSet; 17 17 import org.openstreetmap.josm.data.osm.OsmPrimitive; 18 import org.openstreetmap.josm.gui.OptionPaneUtil; 18 19 import org.openstreetmap.josm.plugins.validator.util.AgregatePrimitivesVisitor; 19 20 import org.openstreetmap.josm.tools.GBC; … … 114 115 p.add(new JScrollPane(errorPanel), GBC.eol()); 115 116 116 int res = JOptionPane.showConfirmDialog(Main.parent, p,117 tr("Data with errors. Upload anyway?"), JOptionPane.YES_NO_OPTION );117 int res = OptionPaneUtil.showConfirmationDialog(Main.parent, p, 118 tr("Data with errors. Upload anyway?"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); 118 119 if(res == JOptionPane.NO_OPTION) 119 120 { -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java
r16681 r16788 33 33 import org.openstreetmap.josm.data.osm.WaySegment; 34 34 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 35 import org.openstreetmap.josm.gui.OptionPaneUtil; 35 36 import org.openstreetmap.josm.gui.SideButton; 36 37 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; … … 190 191 if (asked == JOptionPane.DEFAULT_OPTION) { 191 192 String[] a = new String[] { tr("Whole group"), tr("Single elements"), tr("Nothing") }; 192 asked = JOptionPane.showOptionDialog(Main.parent, tr("Ignore whole group or individual elements?"),193 asked = OptionPaneUtil.showOptionDialog(Main.parent, tr("Ignore whole group or individual elements?"), 193 194 tr("Ignoring elements"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, 194 ImageProvider.get("dialogs", "delete"),a, a[1]);195 a, a[1]); 195 196 } 196 197 if (asked == JOptionPane.YES_NO_OPTION) { -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java
r16438 r16788 44 44 import org.openstreetmap.josm.data.osm.Relation; 45 45 import org.openstreetmap.josm.data.osm.Way; 46 import org.openstreetmap.josm.gui.OptionPaneUtil; 46 47 import org.openstreetmap.josm.gui.preferences.TaggingPresetPreference; 47 48 import org.openstreetmap.josm.gui.tagging.TaggingPreset; … … 619 620 addSrcButton.addActionListener(new ActionListener(){ 620 621 public void actionPerformed(ActionEvent e) { 621 String source = JOptionPane.showInputDialog(Main.parent, tr("TagChecker source")); 622 String source = OptionPaneUtil.showInputDialog( 623 Main.parent, 624 tr("TagChecker source"), 625 tr("TagChecker source"), 626 JOptionPane.QUESTION_MESSAGE 627 ); 622 628 if (source != null) 623 629 ((DefaultListModel)Sources.getModel()).addElement(source); … … 639 645 if(Sources.getModel().getSize() == 0) 640 646 { 641 String source = JOptionPane.showInputDialog(Main.parent, tr("TagChecker source"));647 String source = OptionPaneUtil.showInputDialog(Main.parent, tr("TagChecker source"), tr("TagChecker source"), JOptionPane.QUESTION_MESSAGE); 642 648 if (source != null) 643 649 ((DefaultListModel)Sources.getModel()).addElement(source); … … 645 651 else 646 652 { 647 JOptionPane.showMessageDialog(Main.parent, tr("Please select the row to edit.")); 653 OptionPaneUtil.showMessageDialog( 654 Main.parent, 655 tr("Please select the row to edit."), 656 tr("Information"), 657 JOptionPane.INFORMATION_MESSAGE 658 ); 648 659 } 649 660 } 650 661 else { 651 String source = JOptionPane.showInputDialog(Main.parent, tr("TagChecker source"), Sources.getSelectedValue()); 662 String source = (String)OptionPaneUtil.showInputDialog(Main.parent, 663 tr("TagChecker source"), 664 tr("TagChecker source"), 665 JOptionPane.QUESTION_MESSAGE, null, null, 666 Sources.getSelectedValue()); 652 667 if (source != null) 653 668 ((DefaultListModel)Sources.getModel()).setElementAt(source, row); … … 661 676 public void actionPerformed(ActionEvent e) { 662 677 if (Sources.getSelectedIndex() == -1) 663 JOptionPane.showMessageDialog(Main.parent, tr("Please select the row to delete."));678 OptionPaneUtil.showMessageDialog(Main.parent, tr("Please select the row to delete."), tr("Information"), JOptionPane.QUESTION_MESSAGE); 664 679 else { 665 680 ((DefaultListModel)Sources.getModel()).remove(Sources.getSelectedIndex());
Note:
See TracChangeset
for help on using the changeset viewer.