Skip to content

Commit b914c00

Browse files
authored
[formatting-only] De-tabify .java files
Replace tab characters in .java source files with either 4 or 8 spaces (file-dependent).
1 parent f531bbd commit b914c00

File tree

81 files changed

+12827
-12827
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+12827
-12827
lines changed

unicodetools/src/main/java/org/unicode/draft/CharacterFrequency.java

Lines changed: 175 additions & 175 deletions
Large diffs are not rendered by default.

unicodetools/src/main/java/org/unicode/draft/CldrUtility.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ public class CldrUtility {
5555

5656
/**
5757
* Very simple class, used to replace variables in a string. For example<p>
58-
<pre>static VariableReplacer langTag = new VariableReplacer()
59-
.add("$alpha", "[a-zA-Z]")
60-
.add("$digit", "[0-9]")
61-
.add("$alphanum", "[a-zA-Z0-9]")
62-
.add("$x", "[xX]");
63-
...
64-
String langTagPattern = langTag.replace(...);
65-
</pre>
58+
<pre>static VariableReplacer langTag = new VariableReplacer()
59+
.add("$alpha", "[a-zA-Z]")
60+
.add("$digit", "[0-9]")
61+
.add("$alphanum", "[a-zA-Z0-9]")
62+
.add("$x", "[xX]");
63+
...
64+
String langTagPattern = langTag.replace(...);
65+
</pre>
6666
*/
6767
public static class VariableReplacer {
6868
// simple implementation for now
@@ -118,7 +118,7 @@ static String getPath(String path) {
118118
/** default working directory for Eclipse is . = ${workspace_loc:cldr}, which is <CLDR>/tools/java/ */
119119
// set the base directory with -Dcldrdata=<value>
120120
// if the main is different, use -Dcldrmain=<value>
121-
public static final String BASE_DIRECTORY = getPath(CldrUtility.getProperty("CLDR_DIR", null)); // new File(Utility.getProperty("CLDR_DIR", null)).getPath(); // get up to <CLDR>
121+
public static final String BASE_DIRECTORY = getPath(CldrUtility.getProperty("CLDR_DIR", null)); // new File(Utility.getProperty("CLDR_DIR", null)).getPath(); // get up to <CLDR>
122122
public static final String UTIL_DATA_DIR = getPath(BASE_DIRECTORY, "tools/java/org/unicode/cldr/util/data/"); // "C:/ICU4C/locale/tools/java/org/unicode/cldr/util/";
123123
public static final String UTIL_CLASS_DIR = "org.unicode.cldr.util";
124124
public static final String COMMON_DIRECTORY = getPath(BASE_DIRECTORY , "common/");
@@ -978,9 +978,9 @@ public static void registerTransliteratorFromFile(String id, String dir, String
978978
}
979979

980980
/*String test = "\u049A\u0430\u0437\u0430\u049B";
981-
System.out.println(t.transliterate(test));
982-
t = Transliterator.getInstance(id);
983-
System.out.println(t.transliterate(test));
981+
System.out.println(t.transliterate(test));
982+
t = Transliterator.getInstance(id);
983+
System.out.println(t.transliterate(test));
984984
*/
985985

986986
if (direction == Transliterator.REVERSE) {

unicodetools/src/main/java/org/unicode/draft/FrequencyData2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public class FrequencyData2 {
121121
// }
122122

123123
public FrequencyData2(String frequencyFile, boolean showProgress) throws IOException {
124-
if (true) throw new IllegalArgumentException("old code: see CharacterFrequency");
124+
if (true) throw new IllegalArgumentException("old code: see CharacterFrequency");
125125
BufferedReader in = GenerateNormalizeForMatch2.openUTF8Reader(frequencyFile);
126126
for (int lineCount = 0;; ++lineCount) {
127127
String line = in.readLine();

unicodetools/src/main/java/org/unicode/draft/Hello.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,16 @@ private static void checkCollator(ULocale locale) {
168168
ULocale foo2;
169169
Calendar foo3;
170170

171-
// public final static DateFormat getPatternInstance(String pattern)
172-
// {return null;}
173-
// public final static DateFormat getPatternInstance(String pattern, Locale locale)
174-
// {return null;}
175-
// public final static DateFormat getPatternInstance(String pattern, ULocale locale)
176-
// {return null;}
177-
// public final static DateFormat getPatternInstance(Calendar calendar, String pattern, Locale locale)
178-
// {return null;}
179-
// public final static DateFormat getPatternInstance(Calendar calendar, pattern, ULocale locale)
180-
// {return null;}
171+
// public final static DateFormat getPatternInstance(String pattern)
172+
// {return null;}
173+
// public final static DateFormat getPatternInstance(String pattern, Locale locale)
174+
// {return null;}
175+
// public final static DateFormat getPatternInstance(String pattern, ULocale locale)
176+
// {return null;}
177+
// public final static DateFormat getPatternInstance(Calendar calendar, String pattern, Locale locale)
178+
// {return null;}
179+
// public final static DateFormat getPatternInstance(Calendar calendar, pattern, ULocale locale)
180+
// {return null;}
181181

182182
public static final String
183183
MINUTE_SECOND = "m:ss",

unicodetools/src/main/java/org/unicode/draft/PickerApp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ public PickerApp() {
8989
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
9090
frame.setSize(512, 342);
9191

92-
// JLabel l = new JLabel("s+rl");
93-
// j.getContentPane().add(l);
92+
// JLabel l = new JLabel("s+rl");
93+
// j.getContentPane().add(l);
9494
frame.setLayout(new GridLayout(3, 1));
9595
ListModel<String> model = new ListModel<String>() {
9696
final List<String> categories = PickerData2.CATEGORIES;

unicodetools/src/main/java/org/unicode/draft/WebpageCharacterData.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class WebpageCharacterData {
4343
private static final String SOURCE_DATA = "Apr.11.2015.tsv"; // "unicode-count75.txt"; // "unicode-count-2012-July-21.txt";
4444

4545
enum Columns {
46-
// 000009 ht 954857442 0 0 0 953577889 0 0 0 11182029595621 0 0 0 804363 56255 139 22 http://www.palmbeachschools.org/ 71269 55048 139 22 http://www.palmbeachschools.org/jobs/ 50871 54366 139 22 http://rtghaiti.com/
46+
// 000009 ht 954857442 0 0 0 953577889 0 0 0 11182029595621 0 0 0 804363 56255 139 22 http://www.palmbeachschools.org/ 71269 55048 139 22 http://www.palmbeachschools.org/jobs/ 50871 54366 139 22 http://rtghaiti.com/
4747
codePoint,
4848
language,
4949
preHtmlCount1, postHtmlCount1, documentCount1, utf8DocumentCount1,
@@ -113,10 +113,10 @@ static public void doData() throws IOException {
113113
System.out.println("Writing data");
114114
//System.out.println("zeroCountLines " + zeroCountLines);
115115
writeData(lang2chars, Settings.Output.GEN_DIR +
116-
"frequency/languages");
116+
"frequency/languages");
117117
System.out.println("Writing ranked data");
118118
writeData(lang2charsPageRank, Settings.Output.GEN_DIR +
119-
"frequency/languages-rank");
119+
"frequency/languages-rank");
120120
}
121121

122122
public static void writeData(Map<String, Counter<Integer>> map, String directory) throws IOException {

unicodetools/src/main/java/org/unicode/jsp/UnicodeUtilities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ private void showString(final String string, String separator, Appendable out) t
579579
out.append(UnicodeUtilities.getHex(string, separator, ucdFormat) + "</td><td class='charCell'>\u00A0" + literal + "\u00A0</td><td" + (restricted ? " class='redName'" : "") +
580580
">" + name);
581581
} else {
582-
out.append(UnicodeUtilities.getHex(string, separator, ucdFormat) + " " + (ucdFormat ? "\t;" : "(\u00A0" + literal + "\u00A0) ") + name);
582+
out.append(UnicodeUtilities.getHex(string, separator, ucdFormat) + " " + (ucdFormat ? "\t;" : "(\u00A0" + literal + "\u00A0) ") + name);
583583
}
584584
if (identifierInfo) {
585585
final int cp = string.codePointAt(0);

unicodetools/src/main/java/org/unicode/text/TestICU4J.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ public static class UXCharacter {
233233
*
234234
* Sample: the following are equivalent
235235
* <pre>
236-
* if (UCharacter.test("LB", "AL", cp)) ...
237-
* if (UCharacter.test("line break", "alphabetic", cp)) ...
236+
* if (UCharacter.test("LB", "AL", cp)) ...
237+
* if (UCharacter.test("line break", "alphabetic", cp)) ...
238238
* </pre>
239239
*
240240
*/
@@ -249,10 +249,10 @@ public static boolean test(String propertyName, String propertyValue, int codePo
249249
*
250250
* Sample: the following are equivalent
251251
* <pre>
252-
* if (UCharacter.test("WSpace", cp)) ...
253-
* if (UCharacter.test("White_Space", cp)) ...
254-
* if (UCharacter.test("White_Space", "true", cp)) ...
255-
* if (!UCharacter.test("White_Space", "false", cp)) ...
252+
* if (UCharacter.test("WSpace", cp)) ...
253+
* if (UCharacter.test("White_Space", cp)) ...
254+
* if (UCharacter.test("White_Space", "true", cp)) ...
255+
* if (!UCharacter.test("White_Space", "false", cp)) ...
256256
* </pre>
257257
*
258258
*/
@@ -278,10 +278,10 @@ public static void getSet(String propertyName, String propertyValue, UnicodeSet
278278
*
279279
* Sample: the following are equivalent
280280
* <pre>
281-
* if (UCharacter.test("WSpace", cp)) ...
282-
* if (UCharacter.test("White_Space", cp)) ...
283-
* if (UCharacter.test("White_Space", "true", cp)) ...
284-
* if (!UCharacter.test("White_Space", "false", cp)) ...
281+
* if (UCharacter.test("WSpace", cp)) ...
282+
* if (UCharacter.test("White_Space", cp)) ...
283+
* if (UCharacter.test("White_Space", "true", cp)) ...
284+
* if (!UCharacter.test("White_Space", "false", cp)) ...
285285
* </pre>
286286
*
287287
*/
@@ -300,11 +300,11 @@ public static boolean test(String booleanPropertyName, int codePoint) {
300300
*
301301
* Sample:
302302
* <pre>
303-
* int prop = UCharacter.getPropertyIndexIndex("LB");
304-
* int value = UCharacter.getValueIndex("LB", "AL");
305-
* while (true) {
306-
* ...
307-
* if (test(prop, value, codePoint)) ...
303+
* int prop = UCharacter.getPropertyIndexIndex("LB");
304+
* int value = UCharacter.getValueIndex("LB", "AL");
305+
* while (true) {
306+
* ...
307+
* if (test(prop, value, codePoint)) ...
308308
* </pre>
309309
*
310310
*/

unicodetools/src/main/java/org/unicode/text/UCA/MakeNamesChart.java

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public class MakeNamesChart {
5151
static final String NAMESLIST_DIR = WriteCharts.GEN_CHARTS_DIR + "nameslist/";
5252

5353
public static void main(String[] args) throws Exception {
54-
// checkFile();
55-
// if (true) return;
54+
// checkFile();
55+
// if (true) return;
5656
//ConvertUCD.main(new String[]{"5.0.0"});
5757
final BlockInfo blockInfo = new BlockInfo(Default.ucdVersion(), "NamesList");
5858

@@ -207,10 +207,10 @@ public static void main(String[] args) throws Exception {
207207
try {
208208
if (line.startsWith("@") && !line.startsWith("@+\t*")) {
209209
finishItem(out);
210-
// if (inTable) {
211-
// //out.println("</table>");
212-
// inTable = false;
213-
// }
210+
// if (inTable) {
211+
// //out.println("</table>");
212+
// inTable = false;
213+
// }
214214
line = line.substring(1);
215215
if (line.equals("@+")) {
216216
// skip @@+ which is an index tab
@@ -314,9 +314,9 @@ public static void main(String[] args) throws Exception {
314314
// PrintWriter out = FileUtilities.openUTF8Writer("C:/DATA/GEN/charts/namelist/", "mainList.html");
315315
final PrintWriter out = Utility.openPrintWriter(NAMESLIST_DIR, "mainList.html", Utility.UTF8_WINDOWS);
316316
FileUtilities.appendFile(WriteCharts.class, "nameslist_chart_header.html", out);
317-
// out.println("<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" +
318-
// "<title>Main List</title><link rel='stylesheet' type='text/css' href='nameslist.css'>" +
319-
// "<base target='chart'></head><body><table>");
317+
// out.println("<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" +
318+
// "<title>Main List</title><link rel='stylesheet' type='text/css' href='nameslist.css'>" +
319+
// "<base target='chart'></head><body><table>");
320320
for (int i = 0; i < nameList.size(); ++i) {
321321
final String line = (String) nameList.get(i);
322322
final String[] lineParts = line.split("\t");
@@ -337,9 +337,9 @@ public static void main(String[] args) throws Exception {
337337
showNameDifferences(hasNameCan, hasNoNameCan);
338338
System.out.println("Name differences: Compatibility");
339339
showNameDifferences(hasNameComp, hasNoNameComp);
340-
// System.out.println("Characters with names in decomps: " + hasName.toPattern(true));
341-
// System.out.println("Characters without names in decomps: " + hasNoName.toPattern(true));
342-
// System.out.println("Characters sometimes with, sometimes without names in decomps: " + both.toPattern(true));
340+
// System.out.println("Characters with names in decomps: " + hasName.toPattern(true));
341+
// System.out.println("Characters without names in decomps: " + hasNoName.toPattern(true));
342+
// System.out.println("Characters sometimes with, sometimes without names in decomps: " + both.toPattern(true));
343343
System.out.println("Done");
344344
}
345345

@@ -388,15 +388,15 @@ private static void showNameDifferences(Map hasName, Map hasNoName) {
388388
System.out.println("Count: " + both.size());
389389
}
390390

391-
// static TestIdentifiers ti;
392-
// static {
393-
// try {
394-
// ti = new TestIdentifiers("L");
395-
// } catch (IOException e) {
396-
// // TODO Auto-generated catch block
397-
// e.printStackTrace();
398-
// }
399-
// }
391+
// static TestIdentifiers ti;
392+
// static {
393+
// try {
394+
// ti = new TestIdentifiers("L");
395+
// } catch (IOException e) {
396+
// // TODO Auto-generated catch block
397+
// e.printStackTrace();
398+
// }
399+
// }
400400

401401
private static void finishItem(PrintWriter out) {
402402
if (lastCodePoint < 0) {
@@ -416,26 +416,26 @@ private static void finishItem(PrintWriter out) {
416416
//String nfc = showForm(out, dc, null, Default.nfc().normalize(lastCodePoint), "\u21DB");
417417
final String nfkd = showForm(out, dc, str, nfd, Default.nfkd().normalize(lastCodePoint), "\u21DD");
418418

419-
// if (nfkd.equals(str)) {
420-
// Set s = ti.getConfusables(lastCodePoint, "MA");
421-
// if (s.size() > 1) {
422-
// sortedSet.clear();
423-
// for (Iterator it = s.iterator(); it.hasNext();) {
424-
// sortedSet.add(Default.nfkd().normalize((String)it.next()));
425-
// }
426-
// sortedSet.remove(nfkd); // remove me
427-
// for (Iterator it = sortedSet.iterator(); it.hasNext();) {
428-
// String other = (String)it.next();
429-
// if (nfkd.equals(Default.nfkd().normalize(other))) continue;
430-
// out.println("<tr><td>\u00A0</td><td>\u00A0</td><td class='conf'>\u279F\u00A0"
431-
// + showTextConvertingHex(Utility.hex(other, 4, " + "), true)
432-
// + " "
433-
// + Default.ucd().getName(other, UCD.NORMAL, " + ").toLowerCase()
434-
// // maybeNameStyle(showTextConvertingHex(upper, firstChar != '='), firstChar == '=')
435-
// + "</td></tr>");
436-
// }
437-
// }
438-
// }
419+
// if (nfkd.equals(str)) {
420+
// Set s = ti.getConfusables(lastCodePoint, "MA");
421+
// if (s.size() > 1) {
422+
// sortedSet.clear();
423+
// for (Iterator it = s.iterator(); it.hasNext();) {
424+
// sortedSet.add(Default.nfkd().normalize((String)it.next()));
425+
// }
426+
// sortedSet.remove(nfkd); // remove me
427+
// for (Iterator it = sortedSet.iterator(); it.hasNext();) {
428+
// String other = (String)it.next();
429+
// if (nfkd.equals(Default.nfkd().normalize(other))) continue;
430+
// out.println("<tr><td>\u00A0</td><td>\u00A0</td><td class='conf'>\u279F\u00A0"
431+
// + showTextConvertingHex(Utility.hex(other, 4, " + "), true)
432+
// + " "
433+
// + Default.ucd().getName(other, UCD.NORMAL, " + ").toLowerCase()
434+
// // maybeNameStyle(showTextConvertingHex(upper, firstChar != '='), firstChar == '=')
435+
// + "</td></tr>");
436+
// }
437+
// }
438+
// }
439439
lastCodePoint = -1;
440440
}
441441

@@ -543,7 +543,7 @@ private static String showTextConvertingHex(String body, boolean addCharToHex) {
543543
static Matcher findHex = Pattern.compile("[0-9A-F]+").matcher("");
544544

545545
private static String getOther(String body) {
546-
// of form: x (hyphenation point - 2027)
546+
// of form: x (hyphenation point - 2027)
547547
// => arrow 2027 X hyphenation point
548548
int cp;
549549
String name = null;

unicodetools/src/main/java/org/unicode/text/UCD/CompareProperties.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ public void printStatistics() throws IOException {
310310
tempContains[i].andNot(contains[j]);
311311
}
312312
}
313-
b = disjoints[i]; // don't worry
313+
b = disjoints[i]; // don't worry
314314
for (int j = 0; j < b.size(); ++j) {
315315
if (b.get(j)) {
316316
b.andNot(contains[j]);
@@ -390,25 +390,25 @@ private boolean printBitSet(PrintWriter output, int index, String title, BitSet
390390
}
391391

392392
/*
393-
UnicodeSet a_b = new UnicodeSet();
394-
UnicodeSet ab = new UnicodeSet();
395-
UnicodeSet _ab = new UnicodeSet();
393+
UnicodeSet a_b = new UnicodeSet();
394+
UnicodeSet ab = new UnicodeSet();
395+
UnicodeSet _ab = new UnicodeSet();
396396
*/
397397
/*
398-
a_b.set(sets[i]).removeAll(sets[j]);
399-
ab.set(sets[i]).retainAll(sets[j]);
400-
_ab.set(sets[j]).removeAll(sets[i]);
401-
// we are interested in cases where a contains b or is contained by b
402-
// contain = _ab = 0
403-
// is contained == a_b = 0
404-
// is disjoint == ab == 0
405-
// is equal == contains & iscontained
406-
double total = a_b.size() + ab.size() + _ab.size();
407-
double limit = total*0.03;
408-
boolean gotName = showDiff(output, "C", j, a_b, total, limit, false);
409-
gotName = showDiff(output, "D", j, ab, total, limit, gotName);
410-
gotName = showDiff(output, "S", j, _ab, total, limit, gotName);
411-
if (gotName) output.println();
398+
a_b.set(sets[i]).removeAll(sets[j]);
399+
ab.set(sets[i]).retainAll(sets[j]);
400+
_ab.set(sets[j]).removeAll(sets[i]);
401+
// we are interested in cases where a contains b or is contained by b
402+
// contain = _ab = 0
403+
// is contained == a_b = 0
404+
// is disjoint == ab == 0
405+
// is equal == contains & iscontained
406+
double total = a_b.size() + ab.size() + _ab.size();
407+
double limit = total*0.03;
408+
boolean gotName = showDiff(output, "C", j, a_b, total, limit, false);
409+
gotName = showDiff(output, "D", j, ab, total, limit, gotName);
410+
gotName = showDiff(output, "S", j, _ab, total, limit, gotName);
411+
if (gotName) output.println();
412412
*/
413413

414414
private boolean showDiff(PrintWriter output, String title, int propIndex, UnicodeSet a_b,
@@ -440,7 +440,7 @@ public static void listDifferences() throws IOException {
440440
output.println("# Listing of relationships among properties, suitable for analysis by spreadsheet");
441441
output.println("# Generated for " + Default.ucd().getVersion());
442442
output.println(Utility.generateDateLine());
443-
output.println("# P1 P2 R(P1,P2) C(P1&P2) C(P1-P2) C(P2-P1)");
443+
output.println("# P1\tP2\tR(P1,P2)\tC(P1&P2)\tC(P1-P2)\tC(P2-P1)");
444444

445445

446446
for (int i = 1; i < UCD_Types.LIMIT_ENUM; ++i) {

0 commit comments

Comments
 (0)