Changeset 10137 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2016-04-10T23:53:54+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/validation/util
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java
r9970 r10137 30 30 * @see <a href="http://www.w3.org/TR/html401/charset.html#h-5.3">HTML 4.01 Character References</a> 31 31 * @see <a href="http://www.w3.org/TR/html401/charset.html#code-position">HTML 4.01 Code positions</a> 32 * @since 3669 32 33 */ 33 34 public final class Entities { … … 340 341 } 341 342 343 /** 344 * Returns unescaped entity representation. 345 * @param str entity 346 * @return unescaped entity representation 347 */ 342 348 public static String unescape(String str) { 343 349 int firstAmp = str.indexOf('&'); … … 357 363 int amphersandIdx = str.indexOf('&', i + 1); 358 364 if (amphersandIdx != -1 && amphersandIdx < semiColonIdx) { 359 // Then the text looks like &...&...;365 // Then the text looks like "&...&...;" 360 366 res.append(c); 361 367 continue; … … 365 371 int entityContentLen = entityContent.length(); 366 372 if (entityContentLen > 0) { 367 if (entityContent.charAt(0) == '#') { // escaped value content is an integer (decimal or 368 // hexidecimal) 373 if (entityContent.charAt(0) == '#') { // escaped value content is an integer (decimal or hexidecimal) 369 374 if (entityContentLen > 1) { 370 375 char isHexChar = entityContent.charAt(1); -
trunk/src/org/openstreetmap/josm/data/validation/util/MultipleNameVisitor.java
r8873 r10137 19 19 public class MultipleNameVisitor extends NameVisitor { 20 20 21 /** 22 * Maximum displayed length, in characters. 23 */ 21 24 public static final int MULTIPLE_NAME_MAX_LENGTH = 80; 22 25 -
trunk/src/org/openstreetmap/josm/data/validation/util/NameVisitor.java
r8509 r10137 19 19 * @author imi 20 20 */ 21 //TODO This class used to be in JOSM but it was removed. MultipleNameVisitor depends on it so I copied it here,22 // but MultipleNameVisitor should be refactored instead of using this class23 21 public class NameVisitor extends AbstractVisitor { 24 22 … … 27 25 */ 28 26 public String className; 27 28 /** 29 * The plural name of the item class 30 */ 29 31 public String classNamePlural; 32 30 33 /** 31 34 * The name of this item. 32 35 */ 33 36 public String name = ""; 37 34 38 /** 35 39 * The icon of this item. … … 38 42 39 43 /** 40 * If the node has a name-key or id-key, this is displayed. If not, (lat,lon) 41 * is displayed. 44 * If the node has a name-key or id-key, this is displayed. If not, (lat,lon) is displayed. 42 45 */ 43 46 @Override … … 69 72 } 70 73 74 /** 75 * Returns an horizontal {@code JLabel} with icon and name. 76 * @return horizontal {@code JLabel} with icon and name 77 */ 71 78 public JLabel toLabel() { 72 79 return new JLabel(name, icon, JLabel.HORIZONTAL);
Note:
See TracChangeset
for help on using the changeset viewer.