Changeset 939 in josm
- Timestamp:
- 2008-09-09T09:14:27+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r889 r939 98 98 Collection<OsmPrimitive> sel = Main.ds.getSelected(); 99 99 SearchCompiler.Match matcher = SearchCompiler.compile(search, caseSensitive); 100 int foundMatches = 0; 100 101 for (OsmPrimitive osm : Main.ds.allNonDeletedCompletePrimitives()) { 101 if (mode == SearchMode.replace) { 102 if (mode == SearchMode.replace) 103 { 102 104 if (matcher.match(osm)) 105 { 103 106 sel.add(osm); 107 ++foundMatches; 108 } 104 109 else 105 110 sel.remove(osm); 106 } else if (mode == SearchMode.add && !osm.selected && matcher.match(osm)) 111 } 112 else if (mode == SearchMode.add && !osm.selected && matcher.match(osm)) 113 { 107 114 sel.add(osm); 115 ++foundMatches; 116 } 108 117 else if (mode == SearchMode.remove && osm.selected && matcher.match(osm)) 118 { 109 119 sel.remove(osm); 120 ++foundMatches; 121 } 110 122 } 111 123 Main.ds.setSelected(sel); 124 if(foundMatches == 0) 125 { 126 String msg = null; 127 if (mode == SearchMode.replace) 128 msg = tr("No match found for ''{0}''", search); 129 else if (mode == SearchMode.add) 130 msg = tr("Nothing added to selection by searching for ''{0}''", search); 131 else if (mode == SearchMode.remove) 132 msg = tr("Nothing removed from selection by searching for ''{0}''", search); 133 Main.map.statusLine.setHelpText(msg); 134 JOptionPane.showMessageDialog(Main.parent, msg); 135 } 136 else 137 Main.map.statusLine.setHelpText(tr("Found {0} matches", foundMatches)); 112 138 } catch (SearchCompiler.ParseError e) { 113 139 JOptionPane.showMessageDialog(Main.parent, e.getMessage()); -
trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
r937 r939 346 346 347 347 String oldPlugins = Main.pref.get("plugins"); 348 if ((plugins == null && oldPlugins != null) || 349 plugins != null && !plugins.equals(oldPlugins)) { 348 if(oldPlugins == null && plugins == null) 349 return; 350 if(plugins == null || oldPlugins == null || !plugins.equals(oldPlugins)) 351 { 350 352 Main.pref.put("plugins", plugins); 351 353 gui.requiresRestart = true;
Note:
See TracChangeset
for help on using the changeset viewer.