- Timestamp:
- 2010-11-25T00:07:52+01:00 (14 years ago)
- Location:
- trunk
- Files:
-
- 53 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r3542 r3669 52 52 import org.openstreetmap.josm.data.osm.PrimitiveDeepCopy; 53 53 import org.openstreetmap.josm.data.projection.Projection; 54 import org.openstreetmap.josm.data.validation.OsmValidator; 54 55 import org.openstreetmap.josm.gui.GettingStarted; 55 56 import org.openstreetmap.josm.gui.MainMenu; 56 57 import org.openstreetmap.josm.gui.MapFrame; 58 import org.openstreetmap.josm.gui.MapView; 57 59 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 58 60 import org.openstreetmap.josm.gui.io.SaveLayersDialog; … … 136 138 public final MainMenu menu; 137 139 140 public final OsmValidator validator; 138 141 /** 139 142 * The MOTD Layer. 140 143 */ 141 private GettingStarted gettingStarted =new GettingStarted();144 private GettingStarted gettingStarted = new GettingStarted(); 142 145 143 146 /** … … 217 220 TaggingPresetPreference.initialize(); 218 221 MapPaintPreference.initialize(); 222 223 validator = new OsmValidator(); 224 MapView.addLayerChangeListener(validator); 219 225 220 226 toolbar.refreshToolbarControl(); … … 387 393 if (args.containsKey("geometry")) { 388 394 geometry = args.get("geometry").iterator().next(); 389 // Main.debug("Main window geometry from args: \""+geometry+"\"");390 395 } else { 391 396 geometry = Main.pref.get("gui.geometry"); 392 // Main.debug("Main window geometry from preferences: \""+geometry+"\"");393 397 } 394 398 if (geometry.length() != 0) { -
trunk/src/org/openstreetmap/josm/actions/UploadAction.java
r3530 r3669 16 16 import org.openstreetmap.josm.actions.upload.RelationUploadOrderHook; 17 17 import org.openstreetmap.josm.actions.upload.UploadHook; 18 import org.openstreetmap.josm.actions.upload.ValidateUploadHook; 18 19 import org.openstreetmap.josm.data.APIDataSet; 19 20 import org.openstreetmap.josm.data.conflict.ConflictCollection; … … 50 51 private static final LinkedList<UploadHook> uploadHooks = new LinkedList<UploadHook>(); 51 52 static { 53 uploadHooks.add(new ValidateUploadHook()); 52 54 /** 53 55 * Checks server capabilities before upload. -
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r3431 r3669 77 77 import org.openstreetmap.josm.actions.ZoomOutAction; 78 78 import org.openstreetmap.josm.actions.OrthogonalizeAction.Undo; 79 import org.openstreetmap.josm.actions.ValidateAction; 79 80 import org.openstreetmap.josm.actions.audio.AudioBackAction; 80 81 import org.openstreetmap.josm.actions.audio.AudioFasterAction; -
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r3666 r3669 55 55 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; 56 56 import org.openstreetmap.josm.gui.dialogs.UserListDialog; 57 import org.openstreetmap.josm.gui.dialogs.ValidatorDialog; 57 58 import org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog; 58 59 import org.openstreetmap.josm.gui.layer.Layer; … … 92 93 public FilterDialog filterDialog; 93 94 public RelationListDialog relationListDialog; 95 public ValidatorDialog validatorDialog; 94 96 public SelectionListDialog selectionListDialog; 95 97 /** … … 180 182 addToggleDialog(new HistoryDialog()); 181 183 addToggleDialog(conflictDialog = new ConflictDialog()); 184 addToggleDialog(validatorDialog = new ValidatorDialog()); 182 185 addToggleDialog(filterDialog = new FilterDialog()); 183 186 addToggleDialog(new ChangesetDialog(this)); -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r3594 r3669 113 113 114 114 /** 115 * Adds a edit layer change listener115 * Adds an edit layer change listener 116 116 * 117 117 * @param listener the listener. Ignored if null or already registered. 118 * @param initialFire Fire an edit-layer-changed-event right after adding the listener. 118 * @param initialFire Fire an edit-layer-changed-event right after adding 119 * the listener in case there is an edit layer present 119 120 */ 120 121 public static void addEditLayerChangeListener(EditLayerChangeListener listener, boolean initialFire) { -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r3426 r3669 24 24 import java.util.HashMap; 25 25 import java.util.HashSet; 26 import java.util.List; 26 27 import java.util.Map; 27 28 … … 63 64 import org.openstreetmap.josm.data.osm.visitor.paint.PaintVisitor; 64 65 import org.openstreetmap.josm.data.osm.visitor.paint.SimplePaintVisitor; 66 import org.openstreetmap.josm.data.validation.TestError; 65 67 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 66 68 import org.openstreetmap.josm.gui.MapView; … … 86 88 private boolean isChanged = true; 87 89 private int highlightUpdateCount; 90 91 public List<TestError> validationErrors = new ArrayList<TestError>(); 88 92 89 93 protected void setRequiresSaveToFile(boolean newValue) { … … 483 487 } 484 488 485 ArrayList<WayPoint> trkseg = null;489 List<WayPoint> trkseg = null; 486 490 for (Node n : w.getNodes()) { 487 491 if (!n.isUsable()) { -
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
r3507 r3669 44 44 45 45 /** 46 * Allows PreferenceSettings to do validation of entered values when ok was pressed. If data are invalid then event can47 * return false to cancel closing of preferences dialog46 * Allows PreferenceSettings to do validation of entered values when ok was pressed. 47 * If data is invalid then event can return false to cancel closing of preferences dialog. 48 48 * 49 49 */ … … 168 168 // to restart JOSM 169 169 // 170 StringBu ffer sb = new StringBuffer();170 StringBuilder sb = new StringBuilder(); 171 171 sb.append("<html>"); 172 172 if (task != null && !task.isCanceled()) { … … 222 222 223 223 public void buildGui() { 224 for (PreferenceSettingFactory factory :settingsFactory) {224 for (PreferenceSettingFactory factory : settingsFactory) { 225 225 // logger.info("creating settings: " + factory); 226 226 PreferenceSetting setting = factory.createPreferenceSetting(); … … 276 276 settingsFactory.add(new AudioPreference.Factory()); 277 277 settingsFactory.add(new ShortcutPreference.Factory()); 278 settingsFactory.add(new ValidatorPreference.Factory()); 278 279 279 280 PluginHandler.getPreferenceSetting(settingsFactory); -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r3487 r3669 28 28 import java.util.Set; 29 29 import java.util.Map.Entry; 30 import java.util.TreeMap; 31 import java.util.TreeSet; 30 32 import java.util.concurrent.ExecutionException; 31 33 import java.util.concurrent.ExecutorService; … … 67 69 public class PluginHandler { 68 70 69 final public static String [] DEPRECATED_PLUGINS = new String[] {"mappaint", "unglueplugin", 70 "lang-de", "lang-en_GB", "lang-fr", "lang-it", "lang-pl", "lang-ro", 71 "lang-ru", "ewmsplugin", "ywms", "tways-0.2", "geotagged", "landsat", 72 "namefinder", "waypoints", "slippy_map_chooser", "tcx-support", "usertools", 73 "AgPifoJ", "utilsplugin", "ghost"}; 71 /* deprecated plugins that are removed on start 72 key - plugin name; value - explanation for deprecation (optional, can be null) */ 73 public final static Map<String, String> DEPRECATED_PLUGINS = new TreeMap<String, String>(); 74 static { 75 String IN_CORE = tr("integrated into main program"); 76 for (String[] depr : new String[][] { 77 {"mappaint"}, {"unglueplugin"}, {"lang-de"}, {"lang-en_GB"}, {"lang-fr"}, 78 {"lang-it"}, {"lang-pl"}, {"lang-ro"}, {"lang-ru"}, {"ewmsplugin"}, 79 {"ywms"}, {"tways-0.2"}, {"geotagged"}, {"landsat"}, {"namefinder"}, 80 {"waypoints"}, {"slippy_map_chooser"}, {"tcx-support"}, {"usertools"}, 81 {"AgPifoJ", IN_CORE}, {"utilsplugin", IN_CORE}, {"ghost"}, 82 {"validator", IN_CORE}}) { 83 DEPRECATED_PLUGINS.put(depr[0], depr.length >= 2 ? depr[1] : null); 84 } 85 } 74 86 75 87 final public static String [] UNMAINTAINED_PLUGINS = new String[] {"gpsbabelgui", "Intersect_way"}; … … 90 102 */ 91 103 private static void filterDeprecatedPlugins(Window parent, Collection<String> plugins) { 92 Set<String> removedPlugins = new HashSet<String>();93 for (String p : DEPRECATED_PLUGINS ) {104 Set<String> removedPlugins = new TreeSet<String>(); 105 for (String p : DEPRECATED_PLUGINS.keySet()) { 94 106 if (plugins.contains(p)) { 95 107 plugins.remove(p); … … 103 115 // notify user about removed deprecated plugins 104 116 // 105 StringBu ffer sb = new StringBuffer();117 StringBuilder sb = new StringBuilder(); 106 118 sb.append("<html>"); 107 119 sb.append(trn( … … 112 124 sb.append("<ul>"); 113 125 for (String name: removedPlugins) { 114 sb.append("<li>").append(name).append("</li>"); 126 sb.append("<li>").append(name); 127 String explanation = DEPRECATED_PLUGINS.get(name); 128 if (explanation != null) { 129 sb.append(" ("+explanation+")"); 130 } 131 sb.append("</li>"); 115 132 } 116 133 sb.append("</ul>"); -
trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java
r3530 r3669 201 201 202 202 protected void filterOldPlugins() { 203 for (String p : PluginHandler.DEPRECATED_PLUGINS ) {203 for (String p : PluginHandler.DEPRECATED_PLUGINS.keySet()) { 204 204 if (canceled)return; 205 205 if (availablePlugins.containsKey(p)) { -
trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
r3479 r3669 295 295 protected List<PluginInformation> filterDeprecatedPlugins(List<PluginInformation> plugins) { 296 296 List<PluginInformation> ret = new ArrayList<PluginInformation>(plugins.size()); 297 HashSet<String> deprecatedPluginNames = new HashSet<String>( Arrays.asList(PluginHandler.DEPRECATED_PLUGINS));297 HashSet<String> deprecatedPluginNames = new HashSet<String>(PluginHandler.DEPRECATED_PLUGINS.keySet()); 298 298 for (PluginInformation plugin: plugins) { 299 299 if (deprecatedPluginNames.contains(plugin.name)) {
Note:
See TracChangeset
for help on using the changeset viewer.