Changeset 2915 in josm
- Timestamp:
- 2010-01-31T18:15:15+01:00 (15 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/APIDataSet.java
r2711 r2915 277 277 278 278 /** 279 * Utility class to sort a collection of ofnew relations with their dependencies279 * Utility class to sort a collection of new relations with their dependencies 280 280 * topologically. 281 281 * -
trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java
r2845 r2915 83 83 * Adds a conflict to the collection of conflicts. 84 84 * 85 * @param conflict the conflict to toadd. Must not be null.85 * @param conflict the conflict to add. Must not be null. 86 86 * @throws IllegalArgumentException thrown, if conflict is null 87 87 * @throws IllegalStateException thrown if this collection already includes a conflict for conflict.getMy() -
trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java
r2869 r2915 81 81 private SelectObjectsAction selectObjectsAction; 82 82 private ReadChangesetsAction readChangesetAction; 83 private ShowChangesetInfoAction showChangsetInfoAction; 83 private ShowChangesetInfoAction showChangesetInfoAction; 84 84 private CloseOpenChangesetsAction closeChangesetAction; 85 85 private LaunchChangesetManagerAction launchChangesetManagerAction; … … 202 202 203 203 // -- show info action 204 showChangsetInfoAction = new ShowChangesetInfoAction(); 205 tp.add(new SideButton(showChangsetInfoAction, false)); 206 cbInSelectionOnly.addItemListener(showChangsetInfoAction); 207 lstInActiveDataLayer.getSelectionModel().addListSelectionListener(showChangsetInfoAction); 208 lstInSelection.getSelectionModel().addListSelectionListener(showChangsetInfoAction); 204 showChangesetInfoAction = new ShowChangesetInfoAction(); 205 tp.add(new SideButton(showChangesetInfoAction, false)); 206 cbInSelectionOnly.addItemListener(showChangesetInfoAction); 207 lstInActiveDataLayer.getSelectionModel().addListSelectionListener(showChangesetInfoAction); 208 lstInSelection.getSelectionModel().addListSelectionListener(showChangesetInfoAction); 209 209 210 210 // -- launch changeset manager action … … 574 574 add(closeChangesetAction); 575 575 addSeparator(); 576 add(showChangsetInfoAction); 576 add(showChangesetInfoAction); 577 577 } 578 578 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java
r2895 r2915 217 217 + "Conflict resolutions will not be applied unless all differences<br>" 218 218 + "are resolved.<br>" 219 + "Click <strong>{0}</strong> to close anyway.<strong>Already<br>" 219 + "Click <strong>{0}</strong> to close anyway.<strong> Already<br>" 220 220 + "resolved differences will not be applied.</strong><br>" 221 221 + "Click <strong>{1}</strong> to return to resolving conflicts.</html>" -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java
r2847 r2915 116 116 * id <code>changesetId</code>. 117 117 * 118 * @param changsetId the changeset id 118 * @param changesetId the changeset id 119 119 * @return true if the local {@see ChangesetCache} already includes the changeset with 120 120 * id <code>changesetId</code> 121 121 */ 122 protected boolean isAvailableLocally(int changsetId) { 123 return ChangesetCache.getInstance().get(changsetId) != null; 122 protected boolean isAvailableLocally(int changesetId) { 123 return ChangesetCache.getInstance().get(changesetId) != null; 124 124 } 125 125 -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/SingleChangesetDownloadPanel.java
r2847 r2915 30 30 public class SingleChangesetDownloadPanel extends JPanel { 31 31 32 private JTextField tfChangsetId; 32 private JTextField tfChangesetId; 33 33 private DownloadAction actDownload; 34 34 private ChangesetIdValidator valChangesetId; … … 44 44 45 45 add(new JLabel(tr("Changeset ID: "))); 46 add(tfChangsetId = new JTextField(10)); 47 tfChangsetId.setToolTipText(tr("Enter a changset id")); 48 valChangesetId =ChangesetIdValidator.decorate(tfChangsetId); 49 SelectAllOnFocusGainedDecorator.decorate(tfChangsetId); 46 add(tfChangesetId = new JTextField(10)); 47 tfChangesetId.setToolTipText(tr("Enter a changeset id")); 48 valChangesetId =ChangesetIdValidator.decorate(tfChangesetId); 49 SelectAllOnFocusGainedDecorator.decorate(tfChangesetId); 50 50 51 51 actDownload = new DownloadAction(); 52 52 SideButton btn = new SideButton(actDownload); 53 tfChangsetId.addActionListener(actDownload); 54 tfChangsetId.getDocument().addDocumentListener(actDownload); 53 tfChangesetId.addActionListener(actDownload); 54 tfChangesetId.getDocument().addDocumentListener(actDownload); 55 55 add(btn); 56 56 } … … 66 66 * @return the changeset id entered in this panel 67 67 */ 68 public int getChangsetId() { 68 public int getChangesetId() { 69 69 return valChangesetId.getChangesetId(); 70 70 } … … 84 84 if (!isEnabled()) 85 85 return; 86 int id = getChangsetId(); 86 int id = getChangesetId(); 87 87 if (id == 0) return; 88 88 ChangesetContentDownloadTask task = new ChangesetContentDownloadTask( … … 94 94 95 95 protected void updateEnabledState() { 96 String v = tfChangsetId.getText(); 96 String v = tfChangesetId.getText(); 97 97 if (v == null || v.trim().length() == 0) { 98 98 setEnabled(false); -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java
r2801 r2915 107 107 gc.weightx = 1.0; 108 108 pnl.add(cbMyChangesetsOnly = new JCheckBox(tr("Download my changesets only")), gc); 109 cbMyChangesetsOnly.setToolTipText(tr("<html>Select to restrict the query to your changsets only.<br>Unselect to include all changesets in the query.</html>")); 109 cbMyChangesetsOnly.setToolTipText(tr("<html>Select to restrict the query to your changesets only.<br>Unselect to include all changesets in the query.</html>")); 110 110 111 111 // grab remaining space -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryTask.java
r2801 r2915 38 38 /** true if the task was canceled */ 39 39 private boolean canceled; 40 /** the set of downloaded changsets */ 40 /** the set of downloaded changesets */ 41 41 private Set<Changeset> downloadedChangesets; 42 42 /** the last exception remembered, if any */ -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r2847 r2915 1080 1080 tr("No, continue editing"), 1081 1081 ImageProvider.get("cancel"), 1082 tr("Click to toreturn to the relation editor and to resume relation editing") ,1082 tr("Click to return to the relation editor and to resume relation editing") , 1083 1083 null /* no specific help topic */ 1084 1084 ) -
trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
r2850 r2915 226 226 + "<p class=\"warning-body\">Help content for the help topic <strong>{0}</strong> is " 227 227 + "not available yet. It is missing both in your local language ({1}) and in english.<br><br>" 228 + "Please help to improve the JOSM help system and fill in the missing information." 228 + "Please help to improve the JOSM help system and fill in the missing information. " 229 229 + "You can both edit the <a href=\"{2}\">help topic in your local language ({1})</a> and " 230 230 + "the <a href=\"{3}\">help topic in english</a>." … … 348 348 tr( 349 349 "<html>Failed to open help page for url {0}.<br>" 350 + "This is most likely due to a network problem, please check your<br>"350 + "This is most likely due to a network problem, please check<br>" 351 351 + "your internet connection</html>", 352 352 url.toString() -
trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java
r2848 r2915 191 191 * 192 192 */ 193 protected void handleUploadConflictForClosedChangeset(long changsetId, Date d) { 193 protected void handleUploadConflictForClosedChangeset(long changesetId, Date d) { 194 194 String msg = tr("<html>Uploading <strong>failed</strong> because you have been using<br>" 195 195 + "changeset {0} which was already closed at {1}.<br>" 196 196 + "Please upload again with a new or an existing open changeset.</html>", 197 changsetId, new SimpleDateFormat().format(d) 197 changesetId, new SimpleDateFormat().format(d) 198 198 ); 199 199 JOptionPane.showMessageDialog( -
trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
r2848 r2915 236 236 super.build(); 237 237 tfUserName.setToolTipText(tr("Please enter the user name of your OSM account")); 238 tfPassword.setToolTipText(tr("Please enter the password nameof your OSM account"));238 tfPassword.setToolTipText(tr("Please enter the password of your OSM account")); 239 239 lblHeading.setText( 240 240 "<html>" + tr("Authenticating at the OSM API ''{0}'' failed. Please enter a valid username and a valid password.", -
trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java
r2848 r2915 119 119 im.setPartiallyIdentified(im.getUserName()); 120 120 } 121 System.err.println(tr("Warning: Failed to retrieve user infos for the current JOSM user. Exception swas: {0}", e.toString()));121 System.err.println(tr("Warning: Failed to retrieve user infos for the current JOSM user. Exception was: {0}", e.toString())); 122 122 } 123 123 } -
trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java
r2835 r2915 39 39 private ConfigurationParameterRequestHandler configHandler; 40 40 41 protected String buildChangsetSummary() { 41 protected String buildChangesetSummary() { 42 42 StringBuffer msg = new StringBuffer(); 43 43 if (selectedChangeset == null || selectedChangeset.isNew()) { … … 67 67 // 68 68 boolean useOneChangeset = true; 69 int maxChunkSize = OsmApi.getOsmApi().getCapabilities().getMaxChangsetSize(); 69 int maxChunkSize = OsmApi.getOsmApi().getCapabilities().getMaxChangesetSize(); 70 70 if (maxChunkSize > 0 && numObjects > maxChunkSize) { 71 71 useOneChangeset = false; … … 174 174 sb.append(buildStrategySummary()); 175 175 sb.append("<br><br>"); 176 sb.append(buildChangsetSummary()); 176 sb.append(buildChangesetSummary()); 177 177 sb.append("</html>"); 178 178 jepMessage.setText(sb.toString()); -
trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java
r2862 r2915 97 97 }; 98 98 int numObjectsToUploadLeft = toUpload.getSize() - processedPrimitives.size(); 99 String msg1 = tr("The server reported that the current changset was closed.<br>" 99 String msg1 = tr("The server reported that the current changeset was closed.<br>" 100 100 + "This is most likely because the changesets size exceeded the max. size<br>" 101 101 + "of {0} objects on the server ''{1}''.", 102 OsmApi.getOsmApi().getCapabilities().getMaxChangsetSize(), 102 OsmApi.getOsmApi().getCapabilities().getMaxChangesetSize(), 103 103 OsmApi.getOsmApi().getBaseUrl() 104 104 ); … … 110 110 ); 111 111 String msg3 = tr( 112 "Click ''<strong>{0}</strong>'' to continue uploading to additional new changsets.<br>" 112 "Click ''<strong>{0}</strong>'' to continue uploading to additional new changesets.<br>" 113 113 + "Click ''<strong>{1}</strong>'' to return to the upload dialog.<br>" 114 114 + "Click ''<strong>{2}</strong>'' to abort uploading and return to map editing.<br>", … … 126 126 specs, 127 127 specs[0], 128 ht("/Action/UploadAction#ChangsetFull") 128 ht("/Action/UploadAction#ChangesetFull") 129 129 ); 130 130 switch(ret) { … … 138 138 } 139 139 140 protected void openNewChangset() { 140 protected void openNewChangeset() { 141 141 // make sure the current changeset is removed from the upload dialog. 142 142 // … … 147 147 } 148 148 149 protected boolean recoverFromChangsetFullException() { 149 protected boolean recoverFromChangesetFullException() { 150 150 if (toUpload.getSize() - processedPrimitives.size() == 0) { 151 151 strategy.setPolicy(MaxChangesetSizeExceededPolicy.ABORT); … … 168 168 // prepare the state of the task for a next iteration in uploading. 169 169 // 170 openNewChangset(); 170 openNewChangeset(); 171 171 toUpload.removeProcessed(processedPrimitives); 172 172 return true; … … 264 264 // Most likely the changeset is full. Try to recover and continue 265 265 // with a new changeset, but let the user decide first (see 266 // recoverFromChangsetFullException) 266 // recoverFromChangesetFullException) 267 267 // 268 if (recoverFromChangsetFullException()) { 268 if (recoverFromChangesetFullException()) { 269 269 continue; 270 270 } -
trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java
r2848 r2915 221 221 add(new JPanel(), gc); 222 222 223 int maxChunkSize = OsmApi.getOsmApi().getCapabilities().getMaxChangsetSize(); 223 int maxChunkSize = OsmApi.getOsmApi().getCapabilities().getMaxChangesetSize(); 224 224 pnlMultiChangesetPolicyPanel.setVisible( 225 225 maxChunkSize > 0 && numUploadedObjects > maxChunkSize … … 316 316 317 317 protected void updateNumRequestsLabels() { 318 int maxChunkSize = OsmApi.getOsmApi().getCapabilities().getMaxChangsetSize(); 318 int maxChunkSize = OsmApi.getOsmApi().getCapabilities().getMaxChangesetSize(); 319 319 if (maxChunkSize > 0 && numUploadedObjects > maxChunkSize) { 320 320 rbStrategy.get(UploadStrategy.SINGLE_REQUEST_STRATEGY).setEnabled(false); … … 407 407 try { 408 408 int chunkSize = Integer.parseInt(tfChunkSize.getText().trim()); 409 int maxChunkSize = OsmApi.getOsmApi().getCapabilities().getMaxChangsetSize(); 409 int maxChunkSize = OsmApi.getOsmApi().getCapabilities().getMaxChangesetSize(); 410 410 if (chunkSize <= 0) { 411 411 setErrorFeedback(tfChunkSize, tr("Illegal chunk size <= 0. Please enter an integer > 1")); -
trunk/src/org/openstreetmap/josm/io/Capabilities.java
r2875 r2915 80 80 * @return the max number of objects in a changeset 81 81 */ 82 public int getMaxChangsetSize() { 82 public int getMaxChangesetSize() { 83 83 String v = get("changesets", "maximum_elements"); 84 84 if (v == null) return -1; -
trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
r2875 r2915 156 156 157 157 /** 158 * appends a {@see Way}s id and the list of ids of nodes the way refers to t o the list of ids which will be fetched from the server.158 * appends a {@see Way}s id and the list of ids of nodes the way refers to the list of ids which will be fetched from the server. 159 159 * 160 160 * @param way the way (ignored, if null) -
trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java
r2852 r2915 164 164 * Downloads the content of a changeset 165 165 * 166 * @param id the changset id. >0 required. 166 * @param id the changeset id. >0 required. 167 167 * @param monitor the progress monitor. {@see NullProgressMonitor#INSTANCE} assumed if null. 168 * @return the changset content 168 * @return the changeset content 169 169 * @throws IllegalArgumentException thrown if id <= 0 170 170 * @throws OsmTransferException thrown if something went wrong -
trunk/test/unit/org/openstreetmap/josm/io/ChangesetQueryUrlParserTest.groovy
r2912 r2915 14 14 import static org.junit.Assert.*; 15 15 16 class ChangsetQueryUrlParserTest { 16 class ChangesetQueryUrlParserTest { 17 17 final shouldFail = new GroovyTestCase().&shouldFail 18 18
Note:
See TracChangeset
for help on using the changeset viewer.