Changeset 14828 in josm for trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
- Timestamp:
- 2019-03-03T10:52:10+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r14826 r14828 65 65 import org.openstreetmap.josm.tools.InputMapUtils; 66 66 import org.openstreetmap.josm.tools.JosmRuntimeException; 67 import org.openstreetmap.josm.tools.Pair; 67 68 import org.openstreetmap.josm.tools.Shortcut; 68 69 import org.xml.sax.SAXException; … … 87 88 /** The ignore button */ 88 89 private final SideButton ignoreButton; 90 /** The reset ignorelist button */ 91 private final SideButton ignorelistManagement; 89 92 /** The select button */ 90 93 private final SideButton selectButton; … … 160 163 ignoreButton.setEnabled(false); 161 164 buttons.add(ignoreButton); 165 166 ignorelistManagement = new SideButton(new AbstractAction() { 167 { 168 putValue(NAME, tr("Manage Ignore")); 169 putValue(SHORT_DESCRIPTION, tr("Manage the ignore list")); 170 new ImageProvider("dialogs", "fix").getResource().attachImageIcon(this, true); 171 } 172 173 @Override 174 public void actionPerformed(ActionEvent e) { 175 new ValidatorListManagementDialog("Ignore"); 176 } 177 }); 178 buttons.add(ignorelistManagement); 162 179 } else { 163 180 ignoreButton = null; 164 } 181 ignorelistManagement = null; 182 } 183 165 184 createLayout(tree, true, buttons); 166 185 } … … 169 188 * The action to lookup the selection in the error tree. 170 189 */ 171 190 class LookupAction extends AbstractAction implements DataSelectionListener { 172 191 173 192 LookupAction() { … … 274 293 if (depth <= 1) { 275 294 if (!(mainNodeInfo instanceof TestError)) { 276 Set< String> state = new HashSet<>();295 Set<Pair<String, String>> state = new HashSet<>(); 277 296 // ask if the whole set should be ignored 278 297 if (asked == JOptionPane.DEFAULT_OPTION) { … … 286 305 err.setIgnored(true); 287 306 changed.set(true); 288 state.add( depth== 1 ? err.getIgnoreSubGroup() : err.getIgnoreGroup());307 state.add(new Pair<>(node.getDepth() == 1 ? err.getIgnoreSubGroup() : err.getIgnoreGroup(), err.getMessage())); 289 308 }, processedNodes); 290 for ( Strings : state) {291 OsmValidator.addIgnoredError(s); 309 for (Pair<String, String> s : state) { 310 OsmValidator.addIgnoredError(s.a, s.b); 292 311 } 293 312 continue; … … 300 319 String state = error.getIgnoreState(); 301 320 if (state != null) { 302 OsmValidator.addIgnoredError(state); 321 OsmValidator.addIgnoredError(state, error.getMessage()); 303 322 } 304 323 changed.set(true); … … 317 336 * Sets the selection of the map to the current selected items. 318 337 */ 319 @SuppressWarnings("unchecked")320 338 private void setSelectedItems() { 321 339 DataSet ds = MainApplication.getLayerManager().getActiveDataSet();
Note:
See TracChangeset
for help on using the changeset viewer.