- Timestamp:
- 2019-03-25T10:38:08+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/ChangesetIdTextField.java
r12620 r14930 62 62 public void validate() { 63 63 if (!isValid()) { 64 feedbackInvalid(tr("The current value is not a valid changeset ID. Please enter an integer value > 0 "));64 feedbackInvalid(tr("The current value is not a valid changeset ID. Please enter an integer value > 0 or a changeset URL.")); 65 65 } else { 66 feedbackValid(tr("Please enter an integer value > 0 "));66 feedbackValid(tr("Please enter an integer value > 0 or a changeset URL.")); 67 67 } 68 68 } … … 75 75 String value = getComponent().getText(); 76 76 if (value != null && !value.trim().isEmpty()) { 77 value = value.trim(); 77 78 id = 0; 78 79 try { 79 int changesetId = Integer.parseInt(value.trim()); 80 if (value.matches("http.*/changeset/[0-9]+")) { 81 // full URL given, extract id 82 value = value.substring(value.lastIndexOf('/') + 1); 83 } 84 85 int changesetId = Integer.parseInt(value); 80 86 if (changesetId > 0) { 81 87 id = changesetId;
Note:
See TracChangeset
for help on using the changeset viewer.