Changeset 10748 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2016-08-06T19:21:33+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
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.