Changeset 13435 in josm
- Timestamp:
- 2018-02-18T14:13:19+01:00 (7 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r13434 r13435 251 251 protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) { 252 252 int numWays = 0; 253 if (selection.stream().map( o -> o.getDataSet()).noneMatch(DataSet::isReadOnly)) {253 if (selection.stream().map(OsmPrimitive::getDataSet).noneMatch(DataSet::isReadOnly)) { 254 254 for (OsmPrimitive osm : selection) { 255 255 if (osm instanceof Way && !osm.isIncomplete() && ++numWays >= 2) { -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r13434 r13435 191 191 /** 192 192 * Constructs a new {@code AbstractInternalTask}. 193 *194 193 * @param newLayer if {@code true}, force download to a new layer 195 194 * @param title message for the user … … 207 206 /** 208 207 * Constructs a new {@code AbstractInternalTask}. 209 *210 208 * @param newLayer if {@code true}, force download to a new layer 211 209 * @param title message for the user … … 287 285 // the user explicitly wants a new layer, we don't have any layer at all 288 286 // or it is not clear which layer to merge to 289 //290 287 final OsmDataLayer layer = createNewLayer(newLayerName); 291 288 MainApplication.getLayerManager().addLayer(layer, zoomAfterDownload); -
trunk/src/org/openstreetmap/josm/actions/mapmode/AddNoteAction.java
r13434 r13435 17 17 import org.openstreetmap.josm.gui.NoteInputDialog; 18 18 import org.openstreetmap.josm.gui.Notification; 19 import org.openstreetmap.josm.gui.layer.Layer;20 import org.openstreetmap.josm.gui.layer.NoteLayer;21 19 import org.openstreetmap.josm.gui.util.KeyPressReleaseListener; 22 20 import org.openstreetmap.josm.tools.CheckParameterUtil; … … 102 100 // Do nothing 103 101 } 104 105 @Override106 public boolean layerIsSupported(Layer l) {107 return l instanceof NoteLayer;108 }109 102 } -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r13434 r13435 670 670 } else if (hasSelectionNearby || dragInProgress()) { 671 671 mode = Mode.MOVE; 672 } 673 } 674 mode = Mode.SELECT; 672 } else { 673 mode = Mode.SELECT; 674 } 675 } else { 676 mode = Mode.SELECT; 677 } 675 678 } 676 679 -
trunk/src/org/openstreetmap/josm/actions/relation/EditRelationAction.java
r13434 r13435 89 89 protected void updateEnabledState() { 90 90 boolean enabled = false; 91 if (relations.stream().map( r -> r.getDataSet()).noneMatch(DataSet::isReadOnly)) {91 if (relations.stream().map(Relation::getDataSet).noneMatch(DataSet::isReadOnly)) { 92 92 for (Relation r : relations) { 93 93 if (!r.isDeleted()) { -
trunk/src/org/openstreetmap/josm/gui/layer/MainLayerManager.java
r13434 r13435 496 496 * @param layer The OsmDataLayer to be uploaded 497 497 */ 498 public void prepareLayerForUpload(OsmDataLayer layer) {498 public synchronized void prepareLayerForUpload(OsmDataLayer layer) { 499 499 GuiHelper.assertCallFromEdt(); 500 500 layer.setUploadInProgress(); … … 516 516 * @param layer The OsmDataLayer uploaded 517 517 */ 518 public void processLayerAfterUpload(OsmDataLayer layer) {518 public synchronized void processLayerAfterUpload(OsmDataLayer layer) { 519 519 GuiHelper.assertCallFromEdt(); 520 520 layer.unsetReadOnly(); -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r13434 r13435 1188 1188 } 1189 1189 1190 /** 1191 * Sets the "upload in progress" flag, which will result in displaying a new icon and forbid to remove the layer. 1192 * @since 13434 1193 */ 1190 1194 public void setUploadInProgress() { 1191 1195 if (!isUploadInProgress.compareAndSet(false, true)) { … … 1194 1198 } 1195 1199 1200 /** 1201 * Unsets the "upload in progress" flag, which will result in displaying the standard icon and allow to remove the layer. 1202 * @since 13434 1203 */ 1196 1204 public void unsetUploadInProgress() { 1197 1205 if (!isUploadInProgress.compareAndSet(true, false)) { -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java
r12568 r13435 12 12 import org.junit.Rule; 13 13 import org.junit.Test; 14 import org.openstreetmap.josm.data.osm.DataSet; 14 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 16 import org.openstreetmap.josm.data.osm.OsmUtils; … … 33 34 34 35 List<TestError> test(OsmPrimitive primitive) throws IOException { 36 new DataSet(primitive); 35 37 final TagChecker checker = new TagChecker(); 36 38 checker.initialize(); -
trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryBrowserModelTest.java
r11647 r13435 31 31 @Rule 32 32 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 33 public JOSMTestRules test = new JOSMTestRules().preferences().devAPI() ;33 public JOSMTestRules test = new JOSMTestRules().preferences().devAPI().timeout(20000); 34 34 35 35 /** -
trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryLoadTaskTest.java
r10962 r13435 37 37 @Rule 38 38 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 39 public JOSMTestRules test = new JOSMTestRules().preferences().devAPI() ;39 public JOSMTestRules test = new JOSMTestRules().preferences().devAPI().timeout(20000); 40 40 41 41 /** -
trunk/test/unit/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTaskTest.java
r12743 r13435 25 25 @Rule 26 26 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 27 public JOSMTestRules test = new JOSMTestRules().preferences().devAPI() ;27 public JOSMTestRules test = new JOSMTestRules().preferences().devAPI().timeout(20000); 28 28 29 29 /** -
trunk/test/unit/org/openstreetmap/josm/gui/io/DownloadPrimitivesTaskTest.java
r10976 r13435 28 28 @Rule 29 29 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 30 public JOSMTestRules test = new JOSMTestRules().preferences().devAPI() ;30 public JOSMTestRules test = new JOSMTestRules().preferences().devAPI().timeout(20000); 31 31 32 32 /**
Note:
See TracChangeset
for help on using the changeset viewer.