Changeset 14302 in josm
- Timestamp:
- 2018-10-06T23:29:06+02:00 (6 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java
r14134 r14302 74 74 public CreateMultipolygonAction(final boolean update) { 75 75 super(getName(update), /* ICON */ "multipoly_create", getName(update), 76 /* at least three lines for each shortcut or the server extractor fails */76 /* at least three lines for each shortcut or the server extractor fails */ 77 77 update ? Shortcut.registerShortcut("tools:multipoly_update", 78 78 tr("Tool: {0}", getName(true)), -
trunk/src/org/openstreetmap/josm/command/MoveCommand.java
r14120 r14302 219 219 220 220 /** 221 * Save cur ent displacement to restore in case of some problems221 * Save current displacement to restore in case of some problems 222 222 */ 223 223 public final void saveCheckpoint() { -
trunk/src/org/openstreetmap/josm/data/osm/Stylable.java
r13636 r14302 5 5 6 6 /** 7 * Object that can be rendered using a cach able style.7 * Object that can be rendered using a cacheable style. 8 8 * @since 13636 9 9 */ -
trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java
r12620 r14302 216 216 * @return The number of thimes this tag is used in this collection. 217 217 * @since 10736 218 */ 218 * @deprecated use {@link #getTagOccurrence} 219 */ 220 @Deprecated 219 221 public int getTagOccurence(Tag tag) { 222 return getTagOccurrence(tag); 223 } 224 225 /** 226 * Gets the number of this this tag was added to the collection. 227 * @param tag The tag 228 * @return The number of thimes this tag is used in this collection. 229 * @since 14301 230 */ 231 public int getTagOccurrence(Tag tag) { 220 232 return tags.getOrDefault(tag, 0); 221 233 } -
trunk/src/org/openstreetmap/josm/data/osm/Way.java
r13922 r14302 193 193 194 194 /** 195 * Con tructs a new {@code Way} with id 0.195 * Constructs a new {@code Way} with id 0. 196 196 * @since 86 197 197 */ … … 201 201 202 202 /** 203 * Con tructs a new {@code Way} from an existing {@code Way}.203 * Constructs a new {@code Way} from an existing {@code Way}. 204 204 * @param original The original {@code Way} to be identically cloned. Must not be null 205 205 * @param clearMetadata If {@code true}, clears the OSM id and other metadata as defined by {@link #clearOsmMetadata}. … … 216 216 217 217 /** 218 * Con tructs a new {@code Way} from an existing {@code Way} (including its id).218 * Constructs a new {@code Way} from an existing {@code Way} (including its id). 219 219 * @param original The original {@code Way} to be identically cloned. Must not be null 220 220 * @since 86 … … 225 225 226 226 /** 227 * Con tructs a new {@code Way} for the given id. If the id > 0, the way is marked227 * Constructs a new {@code Way} for the given id. If the id > 0, the way is marked 228 228 * as incomplete. If id == 0 then way is marked as new 229 229 * … … 237 237 238 238 /** 239 * Con tructs a new {@code Way} with given id and version.239 * Constructs a new {@code Way} with given id and version. 240 240 * @param id the id. >= 0 required 241 241 * @param version the version -
trunk/src/org/openstreetmap/josm/data/projection/proj/Proj.java
r10805 r14302 93 93 94 94 /** 95 * Checks w ether the result of projecting a lon coordinate only has a linear relation to the east coordinate and95 * Checks whether the result of projecting a lon coordinate only has a linear relation to the east coordinate and 96 96 * is not related to lat/north at all. 97 97 * @return <code>true</code> if lon has a linear relationship to east only. -
trunk/src/org/openstreetmap/josm/data/validation/tests/Coastlines.java
r11608 r14302 64 64 /** 65 65 * Check connections between coastline ways. 66 * The nodes of a coastline way have to ful lfil these rules:66 * The nodes of a coastline way have to fulfil these rules: 67 67 * 1) the first node must be connected to the last node of a coastline way (which might be the same way) 68 68 * 2) the last node must be connected to the first node of a coastline way (which might be the same way) -
trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDataText.java
r14120 r14302 55 55 private static String getNameAndId(String name, long id) { 56 56 if (name != null) { 57 return name + tr(" ({0})", /* sic to avoid thousand sep erators */ Long.toString(id));57 return name + tr(" ({0})", /* sic to avoid thousand separators */ Long.toString(id)); 58 58 } else { 59 59 return Long.toString(id); -
trunk/src/org/openstreetmap/josm/gui/io/AbstractIOTask.java
r10153 r14302 16 16 17 17 /** 18 * Con tructs a new {@code AbstractIOTask}.18 * Constructs a new {@code AbstractIOTask}. 19 19 */ 20 20 public AbstractIOTask() { -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r14153 r14302 425 425 Collections.sort(data); 426 426 427 // Sup ress the double photos.427 // Suppress the double photos. 428 428 if (data.size() > 1) { 429 429 ImageEntry cur; -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java
r14153 r14302 125 125 * Makes a new marker layer derived from this GpxLayer containing at least one audio marker 126 126 * which the given audio file is associated with. Markers are derived from the following (a) 127 * explic t waypoints in the GPX layer, or (b) named trackpoints in the GPX layer, or (d)127 * explicit waypoints in the GPX layer, or (b) named trackpoints in the GPX layer, or (d) 128 128 * timestamp on the audio file (e) (in future) voice recognised markers in the sound recording (f) 129 129 * a single marker at the beginning of the track -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
r13917 r14302 607 607 set = BooleanStyleSetting.create(c, this, e.getKey()); 608 608 } else { 609 Logging.warn("Unk own setting type: "+type);609 Logging.warn("Unknown setting type: "+type); 610 610 } 611 611 if (set != null) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/MapImage.java
r13657 r14302 252 252 * Rescale excessively large images. 253 253 * @param image the unscaled image 254 * @return The scaled down version to 16x16 pixels if the image height and width exceeds 48 pixels and no size has been explicit ely specified254 * @return The scaled down version to 16x16 pixels if the image height and width exceeds 48 pixels and no size has been explicitly specified 255 255 */ 256 256 private Image rescale(Image image) { 257 257 if (image == null) return null; 258 // Scale down large (.svg) images to 16x16 pixels if no size is explicit ely specified258 // Scale down large (.svg) images to 16x16 pixels if no size is explicitly specified 259 259 if (mustRescale(image)) { 260 260 return ImageProvider.createBoundedImage(image, 16); -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java
r13829 r14302 100 100 break; 101 101 default: 102 Logging.warn("Unk own unit: " + units.indexOf(e.getItem()));102 Logging.warn("Unknown unit: " + units.indexOf(e.getItem())); 103 103 } 104 104 minimumCacheExpiry.setValue(newValue); -
trunk/src/org/openstreetmap/josm/gui/progress/swing/PleaseWaitProgressMonitor.java
r14153 r14302 60 60 /** 61 61 * Display that the current progress cannot be determined 62 * @param newValue w ether the progress cannot be determined62 * @param newValue whether the progress cannot be determined 63 63 */ 64 64 void setIndeterminate(boolean newValue); -
trunk/src/org/openstreetmap/josm/gui/util/StayOpenCheckBoxMenuItem.java
r10611 r14302 25 25 26 26 /** 27 * Con tructs a new {@code StayOpenCheckBoxMenuItem} whose properties are taken from the Action supplied.27 * Constructs a new {@code StayOpenCheckBoxMenuItem} whose properties are taken from the Action supplied. 28 28 * @param a action 29 29 */ -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java
r9576 r14302 130 130 // With a "classic" renderer, we could call setPrototypeDisplayValue(value) + getPreferredSize() 131 131 // but not with TaggingPreset custom renderer that return a dummy height if index is equal to -1 132 // So we explicit ely call the renderer by simulating a correct index for the current value132 // So we explicitly call the renderer by simulating a correct index for the current value 133 133 @SuppressWarnings("unchecked") 134 134 Component c = getRenderer().getListCellRendererComponent(list, value, i, true, true); -
trunk/src/org/openstreetmap/josm/tools/Logging.java
r14273 r14302 53 53 /** 54 54 * A {@link ConsoleHandler} with a couple of extra features, allowing it to be targeted at an 55 * an arbitrary {@link OutputStream} which it can be asked to rea quire the reference for on demand55 * an arbitrary {@link OutputStream} which it can be asked to reacquire the reference for on demand 56 56 * through {@link #reacquireOutputStream()}. It can also prevent a LogRecord's output if a 57 57 * specified {@code prioritizedHandler} would have outputted it. -
trunk/test/unit/org/openstreetmap/josm/data/osm/TagCollectionTest.java
r10736 r14302 44 44 45 45 private void assertTagCounts(TagCollection collection, int a, int b, int c, int d) { 46 assertEquals(a, collection.getTagOccur ence(tagA));47 assertEquals(b, collection.getTagOccur ence(tagB));48 assertEquals(c, collection.getTagOccur ence(tagC));49 assertEquals(d, collection.getTagOccur ence(tagD));46 assertEquals(a, collection.getTagOccurrence(tagA)); 47 assertEquals(b, collection.getTagOccurrence(tagB)); 48 assertEquals(c, collection.getTagOccurrence(tagC)); 49 assertEquals(d, collection.getTagOccurrence(tagD)); 50 50 } 51 51 … … 92 92 public void testUnionOfAllPrimitivesCollectionOfQextendsTagged() { 93 93 TagCollection c = TagCollection.unionOfAllPrimitives(Arrays.asList(tagA)); 94 assertEquals(1, c.getTagOccur ence(tagA));94 assertEquals(1, c.getTagOccurrence(tagA)); 95 95 96 96 TagCollection d = TagCollection.unionOfAllPrimitives(Arrays.asList(tagA, tagC)); … … 187 187 public void testGetTagCount() { 188 188 TagCollection c = new TagCollection(Arrays.asList(tagA, tagC, tagC)); 189 assertEquals(2, c.getTagOccur ence(tagC));190 assertEquals(0, c.getTagOccur ence(tagB));191 assertEquals(0, c.getTagOccur ence(tagNullKey));192 assertEquals(0, c.getTagOccur ence(tagNullValue));189 assertEquals(2, c.getTagOccurrence(tagC)); 190 assertEquals(0, c.getTagOccurrence(tagB)); 191 assertEquals(0, c.getTagOccurrence(tagNullKey)); 192 assertEquals(0, c.getTagOccurrence(tagNullValue)); 193 193 } 194 194 … … 415 415 TagCollection collection = d.getTagsFor("k"); 416 416 assertTagCounts(collection, 1, 1, 0, 0); 417 assertEquals(1, collection.getTagOccur ence(tagEmpty));417 assertEquals(1, collection.getTagOccurrence(tagEmpty)); 418 418 } 419 419 … … 426 426 TagCollection collection = d.getTagsFor(Arrays.asList("k", "k2")); 427 427 assertTagCounts(collection, 1, 1, 1, 0); 428 assertEquals(1, collection.getTagOccur ence(tagEmpty));428 assertEquals(1, collection.getTagOccurrence(tagEmpty)); 429 429 } 430 430 … … 628 628 TagCollection c = c1.intersect(c2); 629 629 assertEquals(2, c.getKeys().size()); 630 assertEquals(1, c.getTagOccur ence(tagA));631 assertEquals(1, c.getTagOccur ence(tagD));630 assertEquals(1, c.getTagOccurrence(tagA)); 631 assertEquals(1, c.getTagOccurrence(tagD)); 632 632 } 633 633 … … 641 641 TagCollection c = c1.minus(c2); 642 642 assertEquals(2, c.getKeys().size()); 643 assertEquals(1, c.getTagOccur ence(tagC));644 assertEquals(1, c.getTagOccur ence(tagEmpty));643 assertEquals(1, c.getTagOccurrence(tagC)); 644 assertEquals(1, c.getTagOccurrence(tagEmpty)); 645 645 } 646 646 … … 653 653 TagCollection c2 = new TagCollection(Arrays.asList(tagA, tagB, tagD)); 654 654 TagCollection c = c1.union(c2); 655 assertEquals(2, c.getTagOccur ence(tagA));656 assertEquals(1, c.getTagOccur ence(tagB));657 assertEquals(1, c.getTagOccur ence(tagC));658 assertEquals(2, c.getTagOccur ence(tagD));659 assertEquals(1, c.getTagOccur ence(tagEmpty));655 assertEquals(2, c.getTagOccurrence(tagA)); 656 assertEquals(1, c.getTagOccurrence(tagB)); 657 assertEquals(1, c.getTagOccurrence(tagC)); 658 assertEquals(2, c.getTagOccurrence(tagD)); 659 assertEquals(1, c.getTagOccurrence(tagEmpty)); 660 660 } 661 661 … … 669 669 TagCollection c = c1.emptyTagsForKeysMissingIn(c2); 670 670 assertEquals(2, c.getKeys().size()); 671 assertEquals(1, c.getTagOccur ence(new Tag(tagC.getKey(), "")));672 assertEquals(1, c.getTagOccur ence(tagEmpty));671 assertEquals(1, c.getTagOccurrence(new Tag(tagC.getKey(), ""))); 672 assertEquals(1, c.getTagOccurrence(tagEmpty)); 673 673 } 674 674
Note:
See TracChangeset
for help on using the changeset viewer.