- Timestamp:
- 2016-09-03T03:27:18+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r10899 r10936 593 593 594 594 private final String name; 595 private Runnable task;595 private final Runnable task; 596 596 597 597 protected InitializationTask(String name, Runnable task) { -
trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
r10932 r10936 304 304 } 305 305 306 private void restoreMapModeState() {307 if (Main.map == null)308 return;309 if (oldMapMode != null) {310 Main.map.selectMapMode(oldMapMode);311 oldMapMode = null;312 } else {313 Main.map.selectSelectTool(false);314 }315 }316 317 306 class WindowEventHandler extends WindowAdapter { 318 307 @Override … … 321 310 restoreMapModeState(); 322 311 } 312 313 private void restoreMapModeState() { 314 if (Main.map == null) 315 return; 316 if (oldMapMode != null) { 317 Main.map.selectMapMode(oldMapMode); 318 oldMapMode = null; 319 } else { 320 Main.map.selectSelectTool(false); 321 } 322 } 323 323 } 324 324 } -
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r10933 r10936 93 93 .append(runtimeVersion != null ? runtimeVersion : System.getProperty("java.version")).append(", ") 94 94 .append(System.getProperty("java.vendor")).append(", ") 95 .append(System.getProperty("java.vm.name")).append('\n'); 96 97 text.append("Screen: "); 95 .append(System.getProperty("java.vm.name")) 96 .append("\nScreen: "); 98 97 if (!GraphicsEnvironment.isHeadless()) { 99 98 text.append(Arrays.stream(GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()).map(gd -> { -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r10875 r10936 640 640 } 641 641 642 private String getTitle(boolean newNode, Node n, Collection<OsmPrimitive> newSelection, List<Way> reuseWays,642 private static String getTitle(boolean newNode, Node n, Collection<OsmPrimitive> newSelection, List<Way> reuseWays, 643 643 boolean extendedWay) { 644 644 String title; -
trunk/src/org/openstreetmap/josm/gui/ProgramArguments.java
r10899 r10936 29 29 * JOSM command line options. 30 30 * @see <a href="https://josm.openstreetmap.de/wiki/Help/CommandLineOptions">Help/CommandLineOptions</a> 31 * @since xxx32 31 */ 33 32 public enum Option { … … 102 101 * Construct the program arguments object 103 102 * @param args The args passed to main. 104 */ 105 public ProgramArguments(String[] args) { 103 * @since 10936 104 */ 105 public ProgramArguments(String ... args) { 106 106 Stream.of(Option.values()).forEach(o -> argMap.put(o, new ArrayList<>())); 107 108 107 buildCommandLineArgumentMap(args); 109 108 } … … 216 215 } 217 216 218 private static String getValue(String []kv) {217 private static String getValue(String ... kv) { 219 218 if (kv.length < 2) { 220 219 return ""; -
trunk/src/org/openstreetmap/josm/gui/datatransfer/AbstractStackTransferHandler.java
r10881 r10936 4 4 import java.awt.datatransfer.UnsupportedFlavorException; 5 5 import java.io.IOException; 6 import java.util.Arrays; 6 7 import java.util.Collection; 7 8 … … 49 50 if (df.supports(support)) { 50 51 try { 52 if (Main.isDebugEnabled()) { 53 Main.debug("{0} pasting {1} at {2}", df.getClass().getSimpleName(), Arrays.toString(support.getDataFlavors()), center); 54 } 51 55 if (df.importData(support, layer, center)) { 52 56 return true; … … 55 59 Main.warn(e); 56 60 } catch (RuntimeException e) { 57 BugReport.intercept(e).put("paster", df).put("flavors", () -> support.getDataFlavors()).warn();61 BugReport.intercept(e).put("paster", df).put("flavors", support::getDataFlavors).warn(); 58 62 } 59 63 } -
trunk/src/org/openstreetmap/josm/gui/datatransfer/OpenTransferHandler.java
r10881 r10936 4 4 import java.util.Arrays; 5 5 import java.util.Collection; 6 import java.util.Collections; 6 7 7 8 import org.openstreetmap.josm.gui.datatransfer.importers.AbstractOsmDataPaster; … … 22 23 @Override 23 24 protected Collection<AbstractOsmDataPaster> getSupportedPasters() { 24 return SUPPORTED;25 return Collections.unmodifiableCollection(SUPPORTED); 25 26 } 26 27 } -
trunk/src/org/openstreetmap/josm/gui/datatransfer/OsmTransferHandler.java
r10890 r10936 8 8 import java.util.Arrays; 9 9 import java.util.Collection; 10 import java.util.Collections; 10 11 11 12 import org.openstreetmap.josm.Main; … … 35 36 @Override 36 37 protected Collection<AbstractOsmDataPaster> getSupportedPasters() { 37 return SUPPORTED;38 return Collections.unmodifiableCollection(SUPPORTED); 38 39 } 39 40 -
trunk/src/org/openstreetmap/josm/io/protocols/data/Handler.java
r10931 r10936 32 32 String protocolHandlers = System.getProperty("java.protocol.handler.pkgs", ""); 33 33 if (!protocolHandlers.contains(pkg)) { 34 if (!protocolHandlers.isEmpty()) { 35 protocolHandlers += "|"; 34 StringBuilder sb = new StringBuilder(protocolHandlers); 35 if (sb.length() > 0) { 36 sb.append('|'); 36 37 } 37 protocolHandlers += pkg;38 Utils.updateSystemProperty("java.protocol.handler.pkgs", protocolHandlers);38 sb.append(pkg); 39 Utils.updateSystemProperty("java.protocol.handler.pkgs", sb.toString()); 39 40 } 40 41 } -
trunk/src/org/openstreetmap/josm/tools/ListenerList.java
r10894 r10936 106 106 protected void failAdd(T listener) { 107 107 throw new IllegalArgumentException( 108 MessageFormat.format("Listener {0} (instance of {1}) was already registered.", listener .toString(),108 MessageFormat.format("Listener {0} (instance of {1}) was already registered.", listener, 109 109 listener.getClass().getName())); 110 110 } … … 128 128 throw new IllegalArgumentException( 129 129 MessageFormat.format("Listener {0} (instance of {1}) was not registered before or already removed.", 130 listener .toString(), listener.getClass().getName()));130 listener, listener.getClass().getName())); 131 131 } 132 132
Note:
See TracChangeset
for help on using the changeset viewer.