Changeset 8799 in josm for trunk/src/org
- Timestamp:
- 2015-09-27T19:45:21+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r8738 r8799 1136 1136 * @see #paramType 1137 1137 */ 1138 privateenum DownloadParamType { httpUrl, fileUrl, bounds, fileName }1138 enum DownloadParamType { httpUrl, fileUrl, bounds, fileName } 1139 1139 1140 1140 /** … … 1143 1143 * @return The guessed parameter type 1144 1144 */ 1145 privatestatic DownloadParamType paramType(String s) {1145 static DownloadParamType paramType(String s) { 1146 1146 if (s.startsWith("http:") || s.startsWith("https:")) return DownloadParamType.httpUrl; 1147 1147 if (s.startsWith("file:")) return DownloadParamType.fileUrl; 1148 1148 String coorPattern = "\\s*[+-]?[0-9]+(\\.[0-9]+)?\\s*"; 1149 if (s.matches(coorPattern+"(,"+coorPattern+") 1149 if (s.matches(coorPattern+"(,"+coorPattern+"){3}")) return DownloadParamType.bounds; 1150 1150 // everything else must be a file name 1151 1151 return DownloadParamType.fileName;
Note:
See TracChangeset
for help on using the changeset viewer.