Changeset 12718 in josm for trunk/src/org/openstreetmap/josm/command/Command.java
- Timestamp:
- 2017-09-04T00:50:22+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/Command.java
r12636 r12718 35 35 * one atomic action on a specific dataset, such as move or delete. 36 36 * 37 * The command remembers the {@link OsmDataLayer} it is operating on.37 * The command remembers the {@link DataSet} it is operating on. 38 38 * 39 39 * @author imi … … 135 135 private Map<OsmPrimitive, PrimitiveData> cloneMap = new HashMap<>(); 136 136 137 /** the layer which this command is applied to */ 137 /** 138 * the layer which this command is applied to 139 * @deprecated to be removed end of 2017. Use {@link #data} instead 140 */ 141 @Deprecated 138 142 private final OsmDataLayer layer; 139 143 … … 146 150 public Command() { 147 151 this.layer = MainApplication.getLayerManager().getEditLayer(); 148 this.data = layer != null ? layer.data : null;152 this.data = layer != null ? layer.data : Main.main.getEditDataSet(); 149 153 } 150 154 … … 154 158 * @param layer the data layer. Must not be null. 155 159 * @throws IllegalArgumentException if layer is null 156 */ 160 * @deprecated to be removed end of 2017. Use {@link #Command(DataSet)} instead 161 */ 162 @Deprecated 157 163 public Command(OsmDataLayer layer) { 158 164 CheckParameterUtil.ensureParameterNotNull(layer, "layer"); … … 216 222 * @param oldLayer the old layer that was removed 217 223 * @return true if this command is invalid after that layer is removed. 218 */ 224 * @deprecated to be removed end of 2017. 225 */ 226 @Deprecated 219 227 public boolean invalidBecauselayerRemoved(Layer oldLayer) { 220 228 return layer == oldLayer; … … 234 242 * Replies the layer this command is (or was) applied to. 235 243 * @return the layer this command is (or was) applied to 236 */ 244 * @deprecated to be removed end of 2017. Use {@link #getAffectedDataSet} instead 245 */ 246 @Deprecated 237 247 protected OsmDataLayer getLayer() { 238 248 return layer; … … 371 381 * Invalidate all layers that were affected by this command. 372 382 * @see Layer#invalidate() 373 */ 383 * @deprecated to be removed end of 2017. 384 */ 385 @Deprecated 374 386 public void invalidateAffectedLayers() { 375 387 OsmDataLayer layer = getLayer();
Note:
See TracChangeset
for help on using the changeset viewer.
