Changeset 10748 in josm
- Timestamp:
- 2016-08-06T19:21:33+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
r10467 r10748 500 500 * @return correct angle 501 501 */ 502 private static double standard _angle_0_to_2PI(double a) {502 private static double standardAngle0to2PI(double a) { 503 503 while (a >= 2 * Math.PI) { 504 504 a -= 2 * Math.PI; … … 515 515 * @return correct angle 516 516 */ 517 private static double standard _angle_mPI_to_PI(double a) {517 private static double standardAngleMPItoPI(double a) { 518 518 while (a > Math.PI) { 519 519 a -= 2 * Math.PI; … … 572 572 */ 573 573 private static int angleToDirectionChange(double a, double deltaMax) throws RejectedAngleException { 574 a = standard _angle_mPI_to_PI(a);574 a = standardAngleMPItoPI(a); 575 575 double d0 = Math.abs(a); 576 576 double d90 = Math.abs(a - Math.PI / 2); … … 584 584 dirChange = -1; 585 585 } else { 586 a = standard _angle_0_to_2PI(a);586 a = standardAngle0to2PI(a); 587 587 double d180 = Math.abs(a - Math.PI); 588 588 if (d180 < deltaMax) { -
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r10716 r10748 712 712 synchronized (selectionLock) { 713 713 for (PrimitiveId o : osm) { 714 changed = changed | this. __toggleSelected(o);714 changed = changed | this.dotoggleSelected(o); 715 715 } 716 716 if (changed) { … … 731 731 } 732 732 733 private boolean __toggleSelected(PrimitiveId primitiveId) {733 private boolean dotoggleSelected(PrimitiveId primitiveId) { 734 734 OsmPrimitive primitive = getPrimitiveByIdChecked(primitiveId); 735 735 if (primitive == null) -
trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java
r10001 r10748 134 134 } 135 135 136 boolean remove _content(T o) {136 boolean removeContent(T o) { 137 137 // If two threads try to remove item at the same time from different buckets of this QBLevel, 138 138 // it might happen that one thread removes bucket but don't remove parent because it still sees … … 147 147 } 148 148 if (this.canRemove()) { 149 this.remove _from_parent();149 this.removeFromParent(); 150 150 } 151 151 return ret; … … 158 158 * is a dead end. 159 159 */ 160 void __split() {160 void doSplit() { 161 161 List<T> tmpcontent = content; 162 162 content = null; … … 165 165 int idx = o.getBBox().getIndex(level); 166 166 if (idx == -1) { 167 __add_content(o);167 doAddContent(o); 168 168 } else { 169 169 getChild(idx).doAdd(o); … … 173 173 } 174 174 175 boolean __add_content(T o) {175 boolean doAddContent(T o) { 176 176 // The split_lock will keep two concurrent calls from overwriting content 177 177 if (content == null) { … … 190 190 } 191 191 192 private void search _contents(BBox searchBbox, List<T> result) {192 private void searchContents(BBox searchBbox, List<T> result) { 193 193 /* 194 194 * It is possible that this was created in a split … … 219 219 } 220 220 221 QBLevel<T> next_sibling() {221 QBLevel<T> findNextSibling() { 222 222 return (parent == null) ? null : parent.firstSiblingOf(this); 223 223 } … … 229 229 QBLevel<T> nextSibling() { 230 230 QBLevel<T> next = this; 231 QBLevel<T> sibling = next. next_sibling();231 QBLevel<T> sibling = next.findNextSibling(); 232 232 // Walk back up the tree to find the next sibling node. 233 233 // It may be either a leaf or branch. … … 237 237 break; 238 238 } 239 sibling = next. next_sibling();239 sibling = next.findNextSibling(); 240 240 } 241 241 return sibling; … … 289 289 } 290 290 } 291 __add_content(o);291 doAddContent(o); 292 292 if (isLeaf() && content.size() > MAX_OBJECTS_PER_LEVEL && level < QuadTiling.NR_LEVELS) { 293 __split();293 doSplit(); 294 294 } 295 295 } … … 307 307 308 308 if (this.hasContent()) { 309 search _contents(searchBbox, result);309 searchContents(searchBbox, result); 310 310 } 311 311 … … 330 330 } 331 331 332 int index _of(QBLevel<T> findThis) {332 int indexOf(QBLevel<T> findThis) { 333 333 QBLevel<T>[] children = getChildren(); 334 334 for (int i = 0; i < QuadTiling.TILES_PER_LEVEL; i++) { … … 359 359 } 360 360 361 void remove _from_parent() {361 void removeFromParent() { 362 362 if (parent == null) 363 363 return; … … 378 378 379 379 if (parent.canRemove()) { 380 parent.remove _from_parent();380 parent.removeFromParent(); 381 381 } 382 382 } … … 461 461 searchCache = null; // Search cache might point to one of removed buckets 462 462 QBLevel<T> bucket = root.findBucket(t.getBBox()); 463 if (bucket.remove _content(t)) {463 if (bucket.removeContent(t)) { 464 464 size--; 465 465 return true; … … 564 564 contentIndex--; 565 565 T object = peek(); 566 currentNode.remove _content(object);566 currentNode.removeContent(object); 567 567 } 568 568 } … … 607 607 // of the nodes which is a parent of the search cache 608 608 while (tmp != null) { 609 tmp.search _contents(searchBbox, ret);609 tmp.searchContents(searchBbox, ret); 610 610 tmp = tmp.parent; 611 611 } -
trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java
r10469 r10748 416 416 if (parameters.get(Param.es.key) != null) { 417 417 double es = parseDouble(parameters, Param.es.key); 418 return Ellipsoid.create _a_es(a, es);418 return Ellipsoid.createAes(a, es); 419 419 } 420 420 if (parameters.get(Param.rf.key) != null) { 421 421 double rf = parseDouble(parameters, Param.rf.key); 422 return Ellipsoid.create _a_rf(a, rf);422 return Ellipsoid.createArf(a, rf); 423 423 } 424 424 if (parameters.get(Param.f.key) != null) { 425 425 double f = parseDouble(parameters, Param.f.key); 426 return Ellipsoid.create _a_f(a, f);426 return Ellipsoid.createAf(a, f); 427 427 } 428 428 if (parameters.get(Param.b.key) != null) { 429 429 double b = parseDouble(parameters, Param.b.key); 430 return Ellipsoid.create _a_b(a, b);430 return Ellipsoid.createAb(a, b); 431 431 } 432 432 } -
trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java
r10680 r10748 17 17 * Airy 1830 18 18 */ 19 public static final Ellipsoid Airy = Ellipsoid.create _a_b(6377563.396, 6356256.910);19 public static final Ellipsoid Airy = Ellipsoid.createAb(6377563.396, 6356256.910); 20 20 21 21 /** 22 22 * Modified Airy 1849 23 23 */ 24 public static final Ellipsoid AiryMod = Ellipsoid.create _a_b(6377340.189, 6356034.446);24 public static final Ellipsoid AiryMod = Ellipsoid.createAb(6377340.189, 6356034.446); 25 25 26 26 /** … … 28 28 * same as GRS67 Modified 29 29 */ 30 public static final Ellipsoid AustSA = Ellipsoid.create _a_rf(6378160.0, 298.25);30 public static final Ellipsoid AustSA = Ellipsoid.createArf(6378160.0, 298.25); 31 31 32 32 /** 33 33 * Bessel 1841 ellipsoid 34 34 */ 35 public static final Ellipsoid Bessel1841 = Ellipsoid.create _a_rf(6377397.155, 299.1528128);35 public static final Ellipsoid Bessel1841 = Ellipsoid.createArf(6377397.155, 299.1528128); 36 36 37 37 /** 38 38 * Bessel 1841 (Namibia) 39 39 */ 40 public static final Ellipsoid BesselNamibia = Ellipsoid.create _a_rf(6377483.865, 299.1528128);40 public static final Ellipsoid BesselNamibia = Ellipsoid.createArf(6377483.865, 299.1528128); 41 41 42 42 /** 43 43 * Clarke 1866 ellipsoid 44 44 */ 45 public static final Ellipsoid Clarke1866 = Ellipsoid.create _a_b(6378206.4, 6356583.8);45 public static final Ellipsoid Clarke1866 = Ellipsoid.createAb(6378206.4, 6356583.8); 46 46 47 47 /** 48 48 * Clarke 1880 (modified) 49 49 */ 50 public static final Ellipsoid Clarke1880 = Ellipsoid.create _a_rf(6378249.145, 293.4663);50 public static final Ellipsoid Clarke1880 = Ellipsoid.createArf(6378249.145, 293.4663); 51 51 52 52 /** 53 53 * Clarke 1880 IGN (French national geographic institute) 54 54 */ 55 public static final Ellipsoid ClarkeIGN = Ellipsoid.create _a_b(6378249.2, 6356515.0);55 public static final Ellipsoid ClarkeIGN = Ellipsoid.createAb(6378249.2, 6356515.0); 56 56 57 57 /** 58 58 * Everest (Sabah & Sarawak) 59 59 */ 60 public static final Ellipsoid EverestSabahSarawak = Ellipsoid.create _a_rf(6377298.556, 300.8017);60 public static final Ellipsoid EverestSabahSarawak = Ellipsoid.createArf(6377298.556, 300.8017); 61 61 62 62 /** 63 63 * GRS67 ellipsoid 64 64 */ 65 public static final Ellipsoid GRS67 = Ellipsoid.create _a_rf(6378160.0, 298.247167427);65 public static final Ellipsoid GRS67 = Ellipsoid.createArf(6378160.0, 298.247167427); 66 66 67 67 /** 68 68 * GRS80 ellipsoid 69 69 */ 70 public static final Ellipsoid GRS80 = Ellipsoid.create _a_rf(6378137.0, 298.257222101);70 public static final Ellipsoid GRS80 = Ellipsoid.createArf(6378137.0, 298.257222101); 71 71 72 72 /** … … 75 75 * Proj.4 code: intl 76 76 */ 77 public static final Ellipsoid Hayford = Ellipsoid.create _a_rf(6378388.0, 297.0);77 public static final Ellipsoid Hayford = Ellipsoid.createArf(6378388.0, 297.0); 78 78 79 79 /** 80 80 * Helmert 1906 81 81 */ 82 public static final Ellipsoid Helmert = Ellipsoid.create _a_rf(6378200.0, 298.3);82 public static final Ellipsoid Helmert = Ellipsoid.createArf(6378200.0, 298.3); 83 83 84 84 /** 85 85 * Krassowsky 1940 ellipsoid 86 86 */ 87 public static final Ellipsoid Krassowsky = Ellipsoid.create _a_rf(6378245.0, 298.3);87 public static final Ellipsoid Krassowsky = Ellipsoid.createArf(6378245.0, 298.3); 88 88 89 89 /** 90 90 * WGS66 ellipsoid 91 91 */ 92 public static final Ellipsoid WGS66 = Ellipsoid.create _a_rf(6378145.0, 298.25);92 public static final Ellipsoid WGS66 = Ellipsoid.createArf(6378145.0, 298.25); 93 93 94 94 /** 95 95 * WGS72 ellipsoid 96 96 */ 97 public static final Ellipsoid WGS72 = Ellipsoid.create _a_rf(6378135.0, 298.26);97 public static final Ellipsoid WGS72 = Ellipsoid.createArf(6378135.0, 298.26); 98 98 99 99 /** 100 100 * WGS84 ellipsoid 101 101 */ 102 public static final Ellipsoid WGS84 = Ellipsoid.create _a_rf(6378137.0, 298.257223563);102 public static final Ellipsoid WGS84 = Ellipsoid.createArf(6378137.0, 298.257223563); 103 103 104 104 /** … … 162 162 * @return the new ellipsoid 163 163 */ 164 public static Ellipsoid create _a_b(double a, double b) {164 public static Ellipsoid createAb(double a, double b) { 165 165 double e2 = (a*a - b*b) / (a*a); 166 166 double e = Math.sqrt(e2); … … 176 176 * @return the new ellipsoid 177 177 */ 178 public static Ellipsoid create _a_es(double a, double es) {178 public static Ellipsoid createAes(double a, double es) { 179 179 double b = a * Math.sqrt(1.0 - es); 180 180 double e = Math.sqrt(es); … … 190 190 * @return the new ellipsoid 191 191 */ 192 public static Ellipsoid create _a_f(double a, double f) {192 public static Ellipsoid createAf(double a, double f) { 193 193 double b = a * (1.0 - f); 194 194 double e2 = f * (2 - f); … … 205 205 * @return the new ellipsoid 206 206 */ 207 public static Ellipsoid create _a_rf(double a, double rf) {208 return create _a_f(a, 1.0 / rf);207 public static Ellipsoid createArf(double a, double rf) { 208 return createAf(a, 1.0 / rf); 209 209 } 210 210 -
trunk/src/org/openstreetmap/josm/data/projection/proj/AbstractProj.java
r10378 r10748 137 137 * @throws RuntimeException if the itteration does not converge. 138 138 */ 139 protected final double inv _mlfn(double arg) {139 protected final double invMlfn(double arg) { 140 140 double s, t, phi, k = 1.0/(1.0 - e2); 141 141 int i; -
trunk/src/org/openstreetmap/josm/data/projection/proj/CassiniSoldner.java
r9555 r10748 79 79 @Override 80 80 public double[] invproject(double x, double y) { 81 double ph1 = inv _mlfn(ml0 + y);81 double ph1 = invMlfn(ml0 + y); 82 82 double tn = Math.tan(ph1); 83 83 double t = tn * tn; -
trunk/src/org/openstreetmap/josm/data/projection/proj/Sinusoidal.java
r9955 r10748 43 43 return new double[]{north, east / cos(north)}; 44 44 } else { 45 final double phi = inv _mlfn(north);45 final double phi = invMlfn(north); 46 46 double s = abs(phi); 47 47 final double lambda; -
trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java
r10250 r10748 156 156 @Override 157 157 public double[] invproject(double x, double y) { 158 double phi = inv _mlfn(ml0 + y);158 double phi = invMlfn(ml0 + y); 159 159 160 160 if (Math.abs(phi) >= Math.PI/2) { -
trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
r10638 r10748 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 import static org.openstreetmap.josm.tools.I18n.trc; 6 import static org.openstreetmap.josm.tools.I18n.trc _lazy;6 import static org.openstreetmap.josm.tools.I18n.trcLazy; 7 7 import static org.openstreetmap.josm.tools.I18n.trn; 8 8 … … 436 436 return null; 437 437 } else if (nameTag.startsWith("?")) { 438 return trc _lazy(nameTag, I18n.escape(relation.get(nameTag.substring(1))));439 } else { 440 return trc _lazy(nameTag, I18n.escape(relation.get(nameTag)));438 return trcLazy(nameTag, I18n.escape(relation.get(nameTag.substring(1)))); 439 } else { 440 return trcLazy(nameTag, I18n.escape(relation.get(nameTag))); 441 441 } 442 442 } -
trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java
r10680 r10748 73 73 74 74 private void diff() { 75 Diff.Change script = new Diff(reference, current).diff _2(false);75 Diff.Change script = new Diff(reference, current).diff2(false); 76 76 // attempt diff with reference reversed and test whether less deletions+inserts are required 77 77 Object[] referenceReversed = Utils.copyArray(reference); 78 78 Collections.reverse(Arrays.asList(referenceReversed)); 79 Diff.Change scriptReversed = new Diff(referenceReversed, current).diff _2(false);79 Diff.Change scriptReversed = new Diff(referenceReversed, current).diff2(false); 80 80 if (scriptReversed == null /* reference and current are identical */ 81 81 || (script != null && scriptReversed.getTotalNumberOfChanges() < script.getTotalNumberOfChanges())) { -
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r10742 r10748 1335 1335 */ 1336 1336 private List<Tile> allExistingTiles() { 1337 return this. __allTiles(false);1337 return this.findAllTiles(false); 1338 1338 } 1339 1339 1340 1340 private List<Tile> allTilesCreate() { 1341 return this. __allTiles(true);1342 } 1343 1344 private List<Tile> __allTiles(boolean create) {1341 return this.findAllTiles(true); 1342 } 1343 1344 private List<Tile> findAllTiles(boolean create) { 1345 1345 // Tileset is either empty or too large 1346 1346 if (zoom == 0 || this.insane()) -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r10611 r10748 164 164 * can be null if the defaults are turned off by user 165 165 */ 166 public static ImageIcon getNoIcon _Icon(StyleSource source) {166 public static ImageIcon getNoIconIcon(StyleSource source) { 167 167 return new ImageProvider("presets/misc/no_icon") 168 168 .setDirs(getIconSourceDirs(source)) -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r10715 r10748 327 327 */ 328 328 public static float red(Color c) { // NO_UCD (unused code) 329 return Utils.color _int2float(c.getRed());329 return Utils.colorInt2float(c.getRed()); 330 330 } 331 331 … … 337 337 */ 338 338 public static float green(Color c) { // NO_UCD (unused code) 339 return Utils.color _int2float(c.getGreen());339 return Utils.colorInt2float(c.getGreen()); 340 340 } 341 341 … … 347 347 */ 348 348 public static float blue(Color c) { // NO_UCD (unused code) 349 return Utils.color _int2float(c.getBlue());349 return Utils.colorInt2float(c.getBlue()); 350 350 } 351 351 … … 357 357 */ 358 358 public static float alpha(Color c) { // NO_UCD (unused code) 359 return Utils.color _int2float(c.getAlpha());359 return Utils.colorInt2float(c.getAlpha()); 360 360 } 361 361 -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaElement.java
r9371 r10748 55 55 56 56 fillImage.alpha = Math.min(255, Math.max(0, Integer.valueOf(Main.pref.getInteger("mappaint.fill-image-alpha", 255)))); 57 Integer pAlpha = Utils.color _float2int(c.get(FILL_OPACITY, null, float.class));57 Integer pAlpha = Utils.colorFloat2int(c.get(FILL_OPACITY, null, float.class)); 58 58 if (pAlpha != null) { 59 59 fillImage.alpha = pAlpha; … … 71 71 alpha = Math.min(255, Math.max(0, Integer.valueOf(Main.pref.getInteger("mappaint.fillalpha", 50)))); 72 72 } 73 Integer pAlpha = Utils.color _float2int(c.get(FILL_OPACITY, null, float.class));73 Integer pAlpha = Utils.colorFloat2int(c.get(FILL_OPACITY, null, float.class)); 74 74 if (pAlpha != null) { 75 75 alpha = pAlpha; -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java
r10378 r10748 256 256 } 257 257 258 Integer pAlpha = Utils.color _float2int(c.get(type.prefix + OPACITY, null, Float.class));258 Integer pAlpha = Utils.colorFloat2int(c.get(type.prefix + OPACITY, null, Float.class)); 259 259 if (pAlpha != null) { 260 260 alpha = pAlpha; … … 281 281 Color dashesBackground = c.get(type.prefix + DASHES_BACKGROUND_COLOR, null, Color.class); 282 282 if (dashesBackground != null) { 283 pAlpha = Utils.color _float2int(c.get(type.prefix + DASHES_BACKGROUND_OPACITY, null, Float.class));283 pAlpha = Utils.colorFloat2int(c.get(type.prefix + DASHES_BACKGROUND_OPACITY, null, Float.class)); 284 284 if (pAlpha != null) { 285 285 alpha = pAlpha; -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/MapImage.java
r10714 r10748 102 102 if (result == null) { 103 103 source.logWarning(tr("Failed to locate image ''{0}''", name)); 104 ImageIcon noIcon = MapPaintStyles.getNoIcon _Icon(source);104 ImageIcon noIcon = MapPaintStyles.getNoIconIcon(source); 105 105 img = noIcon == null ? null : (BufferedImage) noIcon.getImage(); 106 106 } else { … … 134 134 135 135 public float getAlphaFloat() { 136 return Utils.color _int2float(alpha);136 return Utils.colorInt2float(alpha); 137 137 } 138 138 -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/NodeElement.java
r10721 r10748 185 185 186 186 mapImage.alpha = Math.min(255, Math.max(0, Integer.valueOf(Main.pref.getInteger("mappaint.icon-image-alpha", 255)))); 187 Integer pAlpha = Utils.color _float2int(c.get(keys[ICON_OPACITY_IDX], null, float.class));187 Integer pAlpha = Utils.colorFloat2int(c.get(keys[ICON_OPACITY_IDX], null, float.class)); 188 188 if (pAlpha != null) { 189 189 mapImage.alpha = pAlpha; … … 247 247 Stroke stroke = null; 248 248 if (strokeColor != null && strokeWidth != null) { 249 Integer strokeAlpha = Utils.color _float2int(c.get("symbol-stroke-opacity", null, Float.class));249 Integer strokeAlpha = Utils.colorFloat2int(c.get("symbol-stroke-opacity", null, Float.class)); 250 250 if (strokeAlpha != null) { 251 251 strokeColor = new Color(strokeColor.getRed(), strokeColor.getGreen(), … … 261 261 262 262 if (fillColor != null) { 263 Integer fillAlpha = Utils.color _float2int(c.get("symbol-fill-opacity", null, Float.class));263 Integer fillAlpha = Utils.colorFloat2int(c.get("symbol-fill-opacity", null, Float.class)); 264 264 if (fillAlpha != null) { 265 265 fillColor = new Color(fillColor.getRed(), fillColor.getGreen(), -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/TextLabel.java
r9371 r10748 147 147 float alpha = c.get(TEXT_OPACITY, 1f, Float.class); 148 148 color = new Color(color.getRed(), color.getGreen(), 149 color.getBlue(), Utils.color _float2int(alpha));149 color.getBlue(), Utils.colorFloat2int(alpha)); 150 150 151 151 Float haloRadius = c.get(TEXT_HALO_RADIUS, null, Float.class); … … 158 158 float haloAlpha = c.get(TEXT_HALO_OPACITY, 1f, Float.class); 159 159 haloColor = new Color(haloColor.getRed(), haloColor.getGreen(), 160 haloColor.getBlue(), Utils.color _float2int(haloAlpha));160 haloColor.getBlue(), Utils.colorFloat2int(haloAlpha)); 161 161 } 162 162 -
trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
r10378 r10748 843 843 * 844 844 * @return the value of the parent property. 845 * @see # parent_set846 */ 847 public Split parent_get() {845 * @see #setParent 846 */ 847 public Split getParent() { 848 848 return parent; 849 849 } … … 857 857 * 858 858 * @param parent a Split or null 859 * @see # parent_get860 */ 861 public void parent_set(Split parent) {859 * @see #getParent 860 */ 861 public void setParent(Split parent) { 862 862 this.parent = parent; 863 863 } … … 920 920 921 921 private Node siblingAtOffset(int offset) { 922 Split parent = parent_get();922 Split parent = getParent(); 923 923 if (parent == null) 924 924 return null; … … 1017 1017 throw new IllegalArgumentException("children must be a non-null List"); 1018 1018 for (Node child : this.children) { 1019 child. parent_set(null);1019 child.setParent(null); 1020 1020 } 1021 1021 this.children = new ArrayList<>(children); 1022 1022 for (Node child : this.children) { 1023 child. parent_set(this);1023 child.setParent(this); 1024 1024 } 1025 1025 } … … 1126 1126 */ 1127 1127 public final boolean isVertical() { 1128 Split parent = parent_get();1128 Split parent = getParent(); 1129 1129 return parent != null && parent.isRowLayout(); 1130 1130 } -
trunk/src/org/openstreetmap/josm/tools/Diff.java
r10680 r10748 291 291 /** Discard lines from one file that have no matches in the other file. 292 292 */ 293 private void discard _confusing_lines() {294 filevec[0].discard _confusing_lines(filevec[1]);295 filevec[1].discard _confusing_lines(filevec[0]);293 private void discardConfusingLines() { 294 filevec[0].discardConfusingLines(filevec[1]); 295 filevec[1].discardConfusingLines(filevec[0]); 296 296 } 297 297 … … 299 299 * Adjust inserts/deletes of blank lines to join changes as much as possible. 300 300 */ 301 private void shift _boundaries() {302 filevec[0].shift _boundaries(filevec[1]);303 filevec[1].shift _boundaries(filevec[0]);301 private void shiftBoundaries() { 302 filevec[0].shiftBoundaries(filevec[1]); 303 filevec[1].shiftBoundaries(filevec[0]); 304 304 } 305 305 … … 403 403 * @return the differences of two files 404 404 */ 405 public final Change diff _2(final boolean reverse) {405 public final Change diff2(final boolean reverse) { 406 406 return diff(reverse ? reverseScript : forwardScript); 407 407 } … … 420 420 // Some lines are obviously insertions or deletions because they don't match anything. 421 421 // Detect them now, and avoid even thinking about them in the main comparison algorithm. 422 discard _confusing_lines();422 discardConfusingLines(); 423 423 424 424 // Now do the main comparison algorithm, considering just the undiscarded lines. … … 438 438 439 439 // Modify the results slightly to make them prettier in cases where that can validly be done. 440 shift _boundaries();440 shiftBoundaries(); 441 441 442 442 // Get the results of comparison in the form of a chain of `struct change's -- an edit script. … … 547 547 * @param f the other file 548 548 */ 549 void discard _confusing_lines(FileData f) {549 void discardConfusingLines(FileData f) { 550 550 clear(); 551 551 // Set up table of which lines are going to be discarded. … … 749 749 } 750 750 751 /** Adjust inserts/deletes of blank lines to join changes 752 as much as possible. 753 754 We do something when a run of changed lines include a blank 755 line at one end and have an excluded blank line at the other. 756 We are free to choose which blank line is included. 757 `compareseq' always chooses the one at the beginning, 758 but usually it is cleaner to consider the following blank line 759 to be the "change". The only exception is if the preceding blank line 760 would join this change to other changes. 761 @param f the file being compared against 751 /** 752 * Adjust inserts/deletes of blank lines to join changes as much as possible. 753 * 754 * We do something when a run of changed lines include a blank line at one end and have an excluded blank line at the other. 755 * We are free to choose which blank line is included. 756 * `compareseq' always chooses the one at the beginning, but usually it is cleaner to consider the following blank line 757 * to be the "change". The only exception is if the preceding blank line would join this change to other changes. 758 * @param f the file being compared against 762 759 */ 763 void shift _boundaries(FileData f) {760 void shiftBoundaries(FileData f) { 764 761 final boolean[] changed = changedFlag; 765 762 final boolean[] otherChanged = f.changedFlag; -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r10647 r10748 232 232 } 233 233 234 public static String trc _lazy(String context, String text) {234 public static String trcLazy(String context, String text) { 235 235 if (context == null) 236 236 return tr(text); 237 237 if (text == null) 238 238 return null; 239 return MessageFormat.format(gettext _lazy(text, context), (Object) null);239 return MessageFormat.format(gettextLazy(text, context), (Object) null); 240 240 } 241 241 … … 337 337 338 338 /* try without context, when context try fails */ 339 private static String gettext _lazy(String text, String ctx) {339 private static String gettextLazy(String text, String ctx) { 340 340 return gettext(text, ctx, true); 341 341 } -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r10742 r10748 309 309 * range 0...1. If val is outside that range, return 255 310 310 */ 311 public static Integer color _float2int(Float val) {311 public static Integer colorFloat2int(Float val) { 312 312 if (val == null) 313 313 return null; … … 323 323 * @return corresponding float value in range 0 <= x <= 1 324 324 */ 325 public static Float color _int2float(Integer val) {325 public static Float colorInt2float(Integer val) { 326 326 if (val == null) 327 327 return null;
Note:
See TracChangeset
for help on using the changeset viewer.