- Timestamp:
- 2013-12-26T12:05:10+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io/remotecontrol
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
r6362 r6536 394 394 395 395 r.printf("{ \"request\" : \"%s\"", cmd); 396 if (handler.getUsage() != null) { 397 r.printf(", \"usage\" : \"%s\"", handler.getUsage()); 398 } 396 399 r.append(", \"parameters\" : ["); 397 400 … … 458 461 usage.append("<li>"); 459 462 usage.append(handler.getKey()); 463 if (sample.getUsage() != null && !sample.getUsage().isEmpty()) { 464 usage.append(" — <i>").append(sample.getUsage()).append("</i>"); 465 } 460 466 if (mandatory != null) { 461 467 usage.append("<br/>mandatory parameters: ").append(Utils.join(", ", Arrays.asList(mandatory))); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java
r6333 r6536 49 49 { 50 50 return new String[] { "addtags" }; 51 } 52 53 @Override 54 public String getUsage() { 55 return "adds a node (given by its latitude and longitude) to the current dataset"; 51 56 } 52 57 -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
r6333 r6536 50 50 public String[] getOptionalParams() { 51 51 return new String[] { "addtags" }; 52 } 53 54 @Override 55 public String getUsage() { 56 return "adds a way (given by a semicolon separated sequence of lat,lon pairs) to the current dataset"; 52 57 } 53 58 -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/FeaturesHandler.java
r6332 r6536 9 9 10 10 /** 11 * Reports ava lable commands, their parameters and examples11 * Reports available commands, their parameters and examples 12 12 * @since 6091 13 13 */ … … 78 78 79 79 @Override 80 public String getUsage() { 81 return "reports available commands, their parameters and examples"; 82 } 83 84 @Override 80 85 public String[] getUsageExamples() { 81 86 return new String[] {"/features", "/features?q=import,add_node"}; -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java
r6248 r6536 114 114 115 115 @Override 116 public String getUsage() { 117 return "adds an imagery layer (e.g. WMS, TMS))"; 118 } 119 120 @Override 116 121 public String[] getUsageExamples() { 117 122 final String types = Utils.join("|", Utils.transform(Arrays.asList(ImageryInfo.ImageryType.values()), new Utils.Function<ImageryInfo.ImageryType, String>() { -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java
r6248 r6536 49 49 public String[] getOptionalParams() { 50 50 return new String[] {"new_layer"}; 51 } 52 53 @Override 54 public String getUsage() { 55 return "downloads the specified OSM file and adds it to the current data set"; 51 56 } 52 57 -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
r6517 r6536 77 77 78 78 @Override 79 public String getUsage() { 80 return "download a bounding box from the API, zoom to the downloaded area and optionally select one or more objects"; 81 } 82 83 @Override 79 84 public String[] getUsageExamples() { 80 85 return getUsageExamples(myCommand); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java
r6248 r6536 38 38 { 39 39 return new String[] {"new_layer", "addtags"}; 40 } 41 42 @Override 43 public String getUsage() { 44 return "downloads the specified objects from the server"; 40 45 } 41 46 -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/OpenFileHandler.java
r6091 r6536 32 32 33 33 @Override 34 public String getUsage() { 35 return "opens a local file in JOSM"; 36 } 37 38 @Override 34 39 public String[] getUsageExamples() { 35 40 return new String[] {"/open_file?filename=/tmp/test.osm"}; -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java
r6332 r6536 113 113 return null; 114 114 } 115 115 116 public String getUsage() { 117 return null; 118 } 119 116 120 public String[] getUsageExamples() { 117 121 return null; -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/VersionHandler.java
r6091 r6536 53 53 54 54 @Override 55 public String getUsage() { 56 return "returns the current protocol version of the installed JOSM RemoteControl"; 57 } 58 59 @Override 55 60 public String[] getUsageExamples() { 56 61 return new String[] { "/version", "/version?jsonp=test"};
Note:
See TracChangeset
for help on using the changeset viewer.