Changeset 9498 in josm
- Timestamp:
- 2016-01-17T05:29:59+01:00 (9 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
r9402 r9498 64 64 public final class CustomConfigurator { 65 65 66 private static StringBuilder summary = new StringBuilder(); 67 66 68 private CustomConfigurator() { 67 69 // Hide default constructor for utils classes 68 70 } 69 71 70 private static StringBuilder summary = new StringBuilder(); 71 72 /** 73 * Log a formatted message. 74 * @param fmt format 75 * @param vars arguments 76 * @see String#format 77 */ 72 78 public static void log(String fmt, Object... vars) { 73 79 summary.append(String.format(fmt, vars)); 74 80 } 75 81 82 /** 83 * Log a message. 84 * @param s message to log 85 */ 76 86 public static void log(String s) { 77 87 summary.append(s); … … 79 89 } 80 90 91 /** 92 * Returns the log. 93 * @return the log 94 */ 81 95 public static String getLog() { 82 96 return summary.toString(); … … 122 136 123 137 /** 124 * Downloads file to one of JOSM standard folders nad unpack it as ZIP/JAR file138 * Downloads file to one of JOSM standard folders and unpack it as ZIP/JAR file 125 139 * @param address - URL to download 126 140 * @param path - file path relative to base where to put downloaded file … … 223 237 Map<String, Setting<?>> allSettings = Main.pref.getAllSettings(); 224 238 for (String key: allSettings.keySet()) { 225 if (key.matches(pattern)) keySet.add(key); 239 if (key.matches(pattern)) 240 keySet.add(key); 226 241 } 227 242 exportPreferencesKeysToFile(fileName, append, keySet); … … 253 268 Main.warn("Error getting preferences to save:" +ex.getMessage()); 254 269 } 255 if (root == null) return; 270 if (root == null) 271 return; 256 272 try { 257 258 273 Element newRoot = exportDocument.createElement("config"); 259 274 exportDocument.appendChild(newRoot); … … 459 474 try { 460 475 this.mainPrefs = mainPrefs; 461 CustomConfigurator.summary = new StringBuilder();476 summary = new StringBuilder(); 462 477 engine = new ScriptEngineManager().getEngineByName("rhino"); 463 478 engine.eval("API={}; API.pref={}; API.fragments={};"); … … 482 497 483 498 private void processXML(Document document) { 484 Element root = document.getDocumentElement(); 485 processXmlFragment(root); 499 processXmlFragment(document.getDocumentElement()); 486 500 } 487 501 … … 1027 1041 1028 1042 for (Entry<String, List<Collection<String>>> e : listlistMap.entrySet()) { 1029 @SuppressWarnings("unchecked") 1043 @SuppressWarnings({ "unchecked", "rawtypes" }) 1030 1044 List<List<String>> value = (List) e.getValue(); 1031 1045 tmp.put(e.getKey(), new ListListSetting(value)); … … 1149 1163 "}\n"; 1150 1164 1151 // Execute conversion script 1152 engine.eval(init); 1153 } 1165 // Execute conversion script 1166 engine.eval(init); 1167 } 1154 1168 } 1155 1169 } -
trunk/test/unit/org/openstreetmap/josm/data/BoundsTest.java
r9214 r9498 9 9 import org.openstreetmap.josm.data.coor.LatLon; 10 10 11 /** 12 * Unit tests for class {@link Bounds}. 13 */ 11 14 public class BoundsTest { 12 15 -
trunk/test/unit/org/openstreetmap/josm/data/projection/EllipsoidTest.java
r8510 r9498 8 8 import org.openstreetmap.josm.data.coor.LatLon; 9 9 10 /** 11 * Unit tests for class {@link Ellipsoid}. 12 */ 10 13 public class EllipsoidTest { 11 14 -
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionTest.java
r9372 r9498 13 13 import org.openstreetmap.josm.data.coor.LatLon; 14 14 15 /** 16 * Unit tests for class {@link Projection}. 17 */ 15 18 public class ProjectionTest { 16 19
Note:
See TracChangeset
for help on using the changeset viewer.