ICU-4585 whitespace cleanup (and messup) plus changes for 3.4 release

X-SVN-Rev: 17906
This commit is contained in:
Doug Felt 2005-06-16 18:18:40 +00:00
parent 02cec4d5ce
commit 7cf1d71844
4 changed files with 171 additions and 165 deletions

View File

@ -255,11 +255,11 @@
<target name="buildmangle" depends="init,anthack1" if="version.1.4">
<javac includes="com/ibm/icu/dev/tool/docs/CodeMangler.java"
srcdir="${src.dir}"
destdir="${build.dir}"
classpathref="build.classpath"
source="${icu4j.javac.source}"
target="${icu4j.javac.target}"/>
srcdir="${src.dir}"
destdir="${build.dir}"
classpathref="build.classpath"
source="${icu4j.javac.source}"
target="${icu4j.javac.target}"/>
</target>
<target name="mangle" depends="buildmangle" if="version.1.4">
@ -277,17 +277,17 @@
<target name="indices" depends="icudata,tools">
<java classname="com.ibm.icu.dev.tool.index.IndexGenerator" classpath="${build.dir}" logError="true">
<arg value="${build.dir}/com/ibm/icu/impl/data/icudt34b/" />
</java>
<arg value="${build.dir}/com/ibm/icu/impl/data/icudt34b/" />
</java>
<java classname="com.ibm.icu.dev.tool.index.IndexGenerator" classpath="${build.dir}" logError="true">
<arg value="${build.dir}/com/ibm/icu/impl/data/icudt34b/rbnf" />
</java>
<arg value="${build.dir}/com/ibm/icu/impl/data/icudt34b/rbnf" />
</java>
<java classname="com.ibm.icu.dev.tool.index.IndexGenerator" classpath="${build.dir}" logError="true">
<arg value="${build.dir}/com/ibm/icu/impl/data/icudt34b/coll" />
</java>
<arg value="${build.dir}/com/ibm/icu/impl/data/icudt34b/coll" />
</java>
<java classname="com.ibm.icu.dev.tool.index.IndexGenerator" classpath="${build.dir}" logError="true">
<arg value="${build.dir}/com/ibm/icu/impl/data/icudt34b/translit" />
</java>
<arg value="${build.dir}/com/ibm/icu/impl/data/icudt34b/translit" />
</java>
</target>
<target name="one4tools" depends="anthack1,anthack2,mangle" if="version.1.4">
@ -364,11 +364,11 @@
<copy file="${src.dir}/com/ibm/icu/dev/test/rbbi/rbbitst.txt"
todir="${build.dir}/com/ibm/icu/dev/test/rbbi"/>
<copy file="${src.dir}/com/ibm/icu/dev/test/charsetdet/CharsetDetectionTests.xml"
todir="${build.dir}/com/ibm/icu/dev/test/charsetdet"/>
todir="${build.dir}/com/ibm/icu/dev/test/charsetdet"/>
<copy file="${src.dir}/com/ibm/icu/dev/data/riwords.txt"
todir="${build.dir}/com/ibm/icu/dev/data"/>
<copy file="${src.dir}/com/ibm/icu/dev/data/IDNATestInput.txt"
todir="${build.dir}/com/ibm/icu/dev/data"/>
<copy file="${src.dir}/com/ibm/icu/dev/data/IDNATestInput.txt"
todir="${build.dir}/com/ibm/icu/dev/data"/>
<javac includes="com/ibm/icu/dev/data/*.java"
excludes="**/CVS/**/*"
srcdir="${src.dir}"
@ -562,39 +562,38 @@
</target>
<target name="secureCheck" depends="testJar" description="run secure (applet-like) icu4j test suite">
<java classname="com.ibm.icu.dev.test.TestAll" fork="yes" failonerror="true">
<!-- jvmarg value="-verbose"/ -->
<!-- (use for debugging, LOTS of output) <jvmarg value="-Djava.security.debug=access:trace"/ -->
<!-- <jvmarg value="-Djava.security.debug=access:failure,domain"/> -->
<jvmarg value="-Djava.security.manager"/>
<jvmarg value="-Djava.security.policy=${src.dir}/com/ibm/icu/dev/test/security.policy"/>
<!-- jvmarg value="-Djava.security.debug=access:failure"/ -->
<arg value="-w"/>
<!-- arg value="Format/DateFormat/DateFormatTest/TestGenericTime"/ -->
<classpath>
<pathelement location="clover.jar"/>
<pathelement location="${jar.file}"/>
<pathelement location="${testjar.file}"/>
</classpath>
</java>
<java classname="com.ibm.icu.dev.test.TestAll" fork="yes" failonerror="true">
<!-- jvmarg value="-verbose"/ -->
<!-- (use for debugging, LOTS of output) <jvmarg value="-Djava.security.debug=access:trace"/ -->
<!-- <jvmarg value="-Djava.security.debug=access:failure,domain"/> -->
<jvmarg value="-Djava.security.manager"/>
<jvmarg value="-Djava.security.policy=${src.dir}/com/ibm/icu/dev/test/security.policy"/>
<!-- jvmarg value="-Djava.security.debug=access:failure"/ -->
<arg value="-w"/>
<!-- arg value="Format/DateFormat/DateFormatTest/TestGenericTime"/ -->
<classpath>
<pathelement location="clover.jar"/>
<pathelement location="${jar.file}"/>
<pathelement location="${testjar.file}"/>
</classpath>
</java>
</target>
<target name="noDataCheck" depends="core, tests" description="runs the tests when no data is present">
<delete>
<fileset dir="${build.dir}/${icu4j.data.path}"/>
<delete>
<fileset dir="${build.dir}/${icu4j.data.path}"/>
<fileset dir="${build.dir}/${icu4j.data.path}/../" includes="Holiday*.class"/>
<fileset dir="${build.dir}/${icu4j.data.path}/../" includes="BreakIterator*.class"/>
<fileset dir="${build.dir}/${icu4j.testdata.path}"/>
<fileset dir="${build.dir}/${icu4j.testdata.path}../"/>
</delete>
<java classname="com.ibm.icu.dev.test.TestAll" fork="yes" failonerror="true">
<arg value="-nothrow"/>
<arg value="-nodata"/>
<!-- arg value="Format/DateFormat/DateFormatTest/TestGenericTime"/ -->
<classpath>
<pathelement location="clover.jar"/>
<pathelement location="${build.dir}"/>
</classpath>
</java>
<fileset dir="${build.dir}/${icu4j.data.path}/../" includes="BreakIterator*.class"/>
<fileset dir="${build.dir}/${icu4j.testdata.path}"/>
<fileset dir="${build.dir}/${icu4j.testdata.path}../"/>
</delete>
<java classname="com.ibm.icu.dev.test.TestAll" fork="yes" failonerror="true">
<arg value="-nothrow"/>
<arg value="-nodata"/>
<classpath>
<pathelement location="clover.jar"/>
<pathelement location="${build.dir}"/>
</classpath>
</java>
</target>
<target name="_requires14" unless="version.1.4">
<echo message="One of your targets requires JAVA_HOME to be set to JDK version 1.4"/>
@ -623,8 +622,8 @@
source="1.4">
<doclet name="com.ibm.icu.dev.tool.docs.GatherAPIData"
path="${build.dir}">
<param name="-name" value="ICU4J 3.2"/>
<param name="-output" value="${api.dir}/icu4j32.api"/>
<param name="-name" value="ICU4J 3.4"/>
<param name="-output" value="${api.dir}/icu4j34.api"/>
<param name="-gzip"/>
</doclet>
</javadoc>
@ -633,13 +632,13 @@
<target name="apireport" depends="tools" if="version.1.4" description="run API report generator tool">
<java classname="com.ibm.icu.dev.tool.docs.ReportAPI" classpath="${build.dir}" failonerror="true">
<arg value="-old:"/>
<arg value="${api.dir}/icu4j30.api.gz"/>
<arg value="-new:"/>
<arg value="${api.dir}/icu4j32.api.gz"/>
<!-- arg value="-html"/> -->
<arg value="-new:"/>
<arg value="${api.dir}/icu4j34.api.gz"/>
<arg value="-html"/>
<arg value="-out:"/>
<!-- arg value="${api.dir}/icu4j_compare_30_32.html"/> -->
<arg value="icu4j_compare_30_32.txt"/>
<arg value="${api.dir}/icu4j_compare_32_34.html"/>
<!-- arg value="icu4j_compare_32_34.txt"/> -->
</java>
</target>
@ -762,7 +761,7 @@
</target>
<target name="copyAllICUData" depends="init">
<unjar src="${src.dir}/com/ibm/icu/impl/data/icudata.jar" dest="${build.dir}"/>
<unjar src="${src.dir}/com/ibm/icu/impl/data/icudata.jar" dest="${build.dir}"/>
</target>
<target name="moduleJar" depends="init" description="modular build of 'icu4j.jar' jar file">
@ -836,7 +835,7 @@
</target>
<target name="propertiesClasses">
<javac includes="com/ibm/icu/lang/**/*, com/ibm/icu/text/*BreakIterator*.java,com/ibm/icu/text/*BreakDictionary*.java,com/ibm/icu/impl/data/*Break*.java,com/ibm/icu/text/UnicodeSetIterator.java,"
<javac includes="com/ibm/icu/lang/**/*, com/ibm/icu/text/*BreakIterator*.java,com/ibm/icu/text/*BreakDictionary*.java,com/ibm/icu/impl/data/*Break*.java,com/ibm/icu/text/UnicodeSetIterator.java,"
excludes="**/CVS/**/*,com/ibm/icu/impl/UtilityExtensions.java"
srcdir="${src.dir}"
destdir="${build.dir}"
@ -875,7 +874,7 @@
Targets to build only Compression API API and tests
-->
<target name="compression" depends="init" description="modular build of compression services">
<javac includes="com/ibm/icu/text/SCSU.java, com/ibm/icu/text/UnicodeCompressor.java, com/ibm/icu/text/UnicodeDecompressor.java"
<javac includes="com/ibm/icu/text/SCSU.java, com/ibm/icu/text/UnicodeCompressor.java, com/ibm/icu/text/UnicodeDecompressor.java"
excludes="**/CVS/**/*"
srcdir="${src.dir}"
destdir="${build.dir}"
@ -980,7 +979,7 @@
-->
<target name="breakIterator" depends="init,copyFullPropsData" description="modular build of break iterator services">
<javac includes="com/ibm/icu/text/*BreakIterator*.java,com/ibm/icu/impl/data/*Break*.java,com/ibm/icu/lang/**/*,com/ibm/icu/impl/UCharacterName.java,com/ibm/icu/text/UnicodeSetIterator.java"
<javac includes="com/ibm/icu/text/*BreakIterator*.java,com/ibm/icu/impl/data/*Break*.java,com/ibm/icu/lang/**/*,com/ibm/icu/impl/UCharacterName.java,com/ibm/icu/text/UnicodeSetIterator.java"
excludes="**/CVS/**/*, com/ibm/icu/lang/UScriptRun.java,com/ibm/icu/impl/UtilityExtensions.java,com/ibm/icu/impl/BOCU.java,com/ibm/icu/impl/TrieBuilder.java,com/ibm/icu/impl/IntTrieBuilder.java"
srcdir="${src.dir}"
destdir="${build.dir}"
@ -1009,13 +1008,13 @@
Targets to build only StringPrep and IDNA API
-->
<target name="copyStringPrepData" depends="init">
<unjar src="${src.dir}/com/ibm/icu/impl/data/icudata.jar" dest="${build.dir}">
<unjar src="${src.dir}/com/ibm/icu/impl/data/icudata.jar" dest="${build.dir}">
<patternset includes="**/*.spp"/>
</unjar>
</unjar>
</target>
<target name="stringPrep" depends="init,normalizer,copyStringPrepData" description="modular build of stringprep services">
<javac includes="com/ibm/icu/text/*StringPrep*.java,com/ibm/icu/text/*IDNA*.java,com/ibm/icu/impl/*StringPrep*.java"
<javac includes="com/ibm/icu/text/*StringPrep*.java,com/ibm/icu/text/*IDNA*.java,com/ibm/icu/impl/*StringPrep*.java"
excludes="**/CVS/**/*, com/ibm/icu/lang/UScriptRun.java,com/ibm/icu/impl/UtilityExtensions.java,com/ibm/icu/impl/BOCU.java,com/ibm/icu/impl/TrieBuilder.java,com/ibm/icu/impl/IntTrieBuilder.java"
srcdir="${src.dir}"
destdir="${build.dir}"
@ -1036,8 +1035,8 @@
debug="on" deprecation="off"/>
<unjar src="${src.dir}/com/ibm/icu/dev/data/testdata.jar" dest="${build.dir}">
<patternset>
<include name="**/*.spp"/>
<include name="**/idna_rules.res"/>
<include name="**/*.spp"/>
<include name="**/idna_rules.res"/>
</patternset>
</unjar>
</target>
@ -1045,7 +1044,7 @@
<!-- build the extra Transliterator data pertaining to Han-Latin transliteration -->
<target name="extraTransliteratorData" depends="init" description="build han-to-latin transliterator data (normally omitted)">
<copy todir="${build.dir}/com/ibm/icu/impl/data">
<fileset dir="${src.dir}/com/ibm/icu/impl/data" includes="Transliterator_Han_Latin_*.txt"/>
<fileset dir="${src.dir}/com/ibm/icu/impl/data" includes="Transliterator_Han_Latin_*.txt"/>
</copy>
</target>

View File

@ -1,6 +1,6 @@
/**
*******************************************************************************
* Copyright (C) 2004, International Business Machines Corporation and *
* Copyright (C) 2005, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -315,7 +315,10 @@ class APIInfo {
if (result == 0) {
result = lhi.name.compareTo(rhi.name);
if (result == 0 && lhi.getVal(CAT) != CAT_CLASS) {
result = lhi.sig.compareTo(rhi.sig);
// signature change on fields ignored
if (lhi.getVal(CAT) != CAT_FIELD) {
result = lhi.sig.compareTo(rhi.sig);
}
}
}
}

View File

@ -1,6 +1,6 @@
/**
*******************************************************************************
* Copyright (C) 2002-2004, International Business Machines Corporation and *
* Copyright (C) 2002-2005, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -114,7 +114,7 @@ public class CheckTags {
}
boolean show = !brief || last.reportError;
// boolean nomsg = show && brief && error;
// boolean nomsg = show && brief && error;
// System.out.println(">>> " + last + " error: " + error + " show: " + show + " nomsg: " + nomsg);
if (show) {
@ -276,30 +276,30 @@ public class CheckTags {
boolean isClass = doc.isClass() || doc.isInterface();
String header;
if (!isShort || isClass) {
header = "--- ";
} else {
header = "";
}
header += (isClass ? doc.qualifiedName() : doc.name());
if (!isShort || isClass) {
header = "--- ";
} else {
header = "";
}
header += (isClass ? doc.qualifiedName() : doc.name());
if (doc instanceof ExecutableMemberDoc) {
header += ((ExecutableMemberDoc)doc).flatSignature();
}
if (!isShort || isClass) {
header += " ---";
}
stack.push(header, isClass);
if (log) {
logln();
}
doTags(doc);
if (isClass) {
ClassDoc cdoc = (ClassDoc)doc;
doDocs(cdoc.fields(), "Fields", !brief);
doDocs(cdoc.constructors(), "Constructors", !brief);
doDocs(cdoc.methods(), "Methods", !brief);
}
stack.pop();
if (!isShort || isClass) {
header += " ---";
}
stack.push(header, isClass);
if (log) {
logln();
}
doTags(doc);
if (isClass) {
ClassDoc cdoc = (ClassDoc)doc;
doDocs(cdoc.fields(), "Fields", !brief);
doDocs(cdoc.constructors(), "Constructors", !brief);
doDocs(cdoc.methods(), "Methods", !brief);
}
stack.pop();
}
}
@ -308,7 +308,7 @@ public class CheckTags {
boolean foundRequiredTag = false;
boolean foundDraftTag = false;
boolean foundDeprecatedTag = false;
boolean foundObsoleteTag = false;
boolean foundObsoleteTag = false;
for (int i = 0; i < tags.length; ++i) {
Tag tag = tags[i];
@ -336,6 +336,10 @@ public class CheckTags {
tagErr(tag);
break;
}
if (tag.text().indexOf("ICU 2.8") != -1) {
tagErr(tag);
break;
}
if (tag.text().indexOf("ICU") != 0) {
tagErr(tag);
break;
@ -347,16 +351,16 @@ public class CheckTags {
if (tag.text().indexOf("ICU") == 0) {
foundRequiredTag = true;
}
if (tag.text().trim().length() == 0) {
tagErr(tag);
}
if (tag.text().trim().length() == 0) {
tagErr(tag);
}
break;
case OBSOLETE:
if (tag.text().indexOf("ICU") != 0) {
tagErr(tag);
}
foundObsoleteTag = true;
foundObsoleteTag = true;
foundRequiredTag = true;
break;

View File

@ -114,17 +114,17 @@ public class ReportAPI {
return added.get(typ, brief);
}
public void print(PrintWriter pw, boolean detail, boolean html) {
pw.print(" ");
removed.print(pw, detail, html);
if (html) {
pw.println("</br>");
} else {
pw.println();
pw.print("--> ");
}
added.print(pw, detail, html);
}
public void print(PrintWriter pw, boolean detail, boolean html) {
pw.print(" ");
removed.print(pw, detail, html);
if (html) {
pw.println("</br>");
} else {
pw.println();
pw.print("--> ");
}
added.print(pw, detail, html);
}
}
public static void main(String[] args) {
@ -149,23 +149,23 @@ public class ReportAPI {
new ReportAPI(oldFile, newFile).writeReport(outFile, html);
}
/*
while the both are methods and the class and method names are the same, collect
overloads. when you hit a new method or class, compare the overloads
looking for the same # of params and simple param changes. ideally
there are just a few.
/*
while the both are methods and the class and method names are the same, collect
overloads. when you hit a new method or class, compare the overloads
looking for the same # of params and simple param changes. ideally
there are just a few.
String oldA = null;
String oldR = null;
if (!a.isMethod()) {
remove and continue
}
String am = a.getClassName() + "." + a.getName();
String rm = r.getClassName() + "." + r.getName();
int comp = am.compare(rm);
if (comp == 0 && a.isMethod() && r.isMethod())
String oldA = null;
String oldR = null;
if (!a.isMethod()) {
remove and continue
}
String am = a.getClassName() + "." + a.getName();
String rm = r.getClassName() + "." + r.getName();
int comp = am.compare(rm);
if (comp == 0 && a.isMethod() && r.isMethod())
*/
*/
ReportAPI(String oldFile, String newFile) {
oldData = APIData.read(oldFile);
@ -182,35 +182,35 @@ public class ReportAPI {
Iterator ri = removed.iterator();
Comparator c = APIInfo.changedComparator();
ArrayList ams = new ArrayList();
ArrayList rms = new ArrayList();
PrintWriter outpw = new PrintWriter(System.out);
ArrayList ams = new ArrayList();
ArrayList rms = new ArrayList();
PrintWriter outpw = new PrintWriter(System.out);
APIInfo a = null, r = null;
while (ai.hasNext() && ri.hasNext()) {
if (a == null) a = (APIInfo)ai.next();
if (r == null) r = (APIInfo)ri.next();
String am = a.getClassName() + "." + a.getName();
String rm = r.getClassName() + "." + r.getName();
int comp = am.compareTo(rm);
if (comp == 0 && a.isMethod() && r.isMethod()) { // collect overloads
ams.add(a); a = null;
rms.add(r); r = null;
continue;
}
String am = a.getClassName() + "." + a.getName();
String rm = r.getClassName() + "." + r.getName();
int comp = am.compareTo(rm);
if (comp == 0 && a.isMethod() && r.isMethod()) { // collect overloads
ams.add(a); a = null;
rms.add(r); r = null;
continue;
}
if (!ams.isEmpty()) {
// simplest case first
if (ams.size() == 1 && rms.size() == 1) {
changed.add(new DeltaInfo((APIInfo)ams.get(0), (APIInfo)rms.get(0)));
} else {
// dang, what to do now?
// TODO: modify deltainfo to deal with lists of added and removed
}
ams.clear();
rms.clear();
}
if (!ams.isEmpty()) {
// simplest case first
if (ams.size() == 1 && rms.size() == 1) {
changed.add(new DeltaInfo((APIInfo)ams.get(0), (APIInfo)rms.get(0)));
} else {
// dang, what to do now?
// TODO: modify deltainfo to deal with lists of added and removed
}
ams.clear();
rms.clear();
}
int result = c.compare(a, r);
if (result < 0) {
@ -224,13 +224,13 @@ public class ReportAPI {
}
}
// now clean up added and removed by cleaning out the changed members
Iterator ci = changed.iterator();
while (ci.hasNext()) {
DeltaInfo di = (DeltaInfo)ci.next();
added.remove(di.added);
removed.remove(di.removed);
}
// now clean up added and removed by cleaning out the changed members
Iterator ci = changed.iterator();
while (ci.hasNext()) {
DeltaInfo di = (DeltaInfo)ci.next();
added.remove(di.added);
removed.remove(di.removed);
}
Set tempAdded = new HashSet();
tempAdded.addAll(newData.set);
@ -477,29 +477,29 @@ public class ReportAPI {
}
clas = className;
}
// pw.print(" ");
// pw.print(" ");
}
if (html) {
pw.print("<li>");
// if (info instanceof DeltaInfo) {
// DeltaInfo dinfo = (DeltaInfo)info;
// dinfo.removed.print(pw, isChangedAPIs, html);
// pw.println("</br>");
// dinfo.added.print(pw, isChangedAPIs, html);
// } else {
info.print(pw, isChangedAPIs, html);
// }
// if (info instanceof DeltaInfo) {
// DeltaInfo dinfo = (DeltaInfo)info;
// dinfo.removed.print(pw, isChangedAPIs, html);
// pw.println("</br>");
// dinfo.added.print(pw, isChangedAPIs, html);
// } else {
info.print(pw, isChangedAPIs, html);
// }
pw.println("</li>");
} else {
// if (info instanceof DeltaInfo) {
// DeltaInfo dinfo = (DeltaInfo)info;
// dinfo.removed.println(pw, isChangedAPIs, html);
// pw.print(" --> ");
// dinfo.added.println(pw, isChangedAPIs, html);
// } else {
info.println(pw, isChangedAPIs, html);
// }
// if (info instanceof DeltaInfo) {
// DeltaInfo dinfo = (DeltaInfo)info;
// dinfo.removed.println(pw, isChangedAPIs, html);
// pw.print(" --> ");
// dinfo.added.println(pw, isChangedAPIs, html);
// } else {
info.println(pw, isChangedAPIs, html);
// }
}
}