From 3b9fe8ba09e0ee7b4426442aa8dd0a17855c0e5c Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Thu, 28 Oct 2010 00:08:31 +0000 Subject: [PATCH] ICU-7373 add enums X-SVN-Rev: 28933 --- .../com/ibm/icu/dev/tools/docs/StableAPI.java | 19 ++- .../ibm/icu/dev/tools/docs/dumpAllCFunc.xslt | 61 ++++++++ .../icu/dev/tools/docs/dumpAllCppFunc.xslt | 144 +++++++++++++----- 3 files changed, 187 insertions(+), 37 deletions(-) diff --git a/tools/release/java/src/com/ibm/icu/dev/tools/docs/StableAPI.java b/tools/release/java/src/com/ibm/icu/dev/tools/docs/StableAPI.java index 1a2f320a543..f57641b22d1 100644 --- a/tools/release/java/src/com/ibm/icu/dev/tools/docs/StableAPI.java +++ b/tools/release/java/src/com/ibm/icu/dev/tools/docs/StableAPI.java @@ -42,6 +42,8 @@ import org.w3c.dom.NodeList; import org.xml.sax.InputSource; import org.xml.sax.SAXException; +import com.sun.xml.internal.fastinfoset.stax.events.XMLConstants; + /** A utility to report the status change between two ICU releases @@ -204,6 +206,8 @@ public class StableAPI { } } + private static boolean didWarnSuperTrim = false; + private static String trimICU(String ver) { final String ICU_ = ICU_SPACE_PREFIX; final String ICU = "ICU"; @@ -220,7 +224,11 @@ public class StableAPI { int n; for(n=ver.length()-1;n>0 && ((ver.charAt(n)=='.') || Character.isDigit(ver.charAt(n))) ;n--) ; - warn("super-trimming: '" + ver + "'"); + warn("Trimming extraneous 'version' text: '" + ver + "'"); + if(!didWarnSuperTrim) { + didWarnSuperTrim = true; + warn("Please ONLY use: '@whatever ICU X.Y.Z'"); + } if(n>0) { ver = ver.substring(n+1).trim(); } @@ -361,7 +369,8 @@ public class StableAPI { static String getAttr(Node node, String attrName){ if(node.getAttributes()==null && node.getNodeType()==3) { - return "(text node 3)"; +// return "(text node 3)"; + return "(Node: " + node.toString() + " )"; // return node.getFirstChild().getAttributes().getNamedItem(attrName).getNodeValue(); } @@ -408,7 +417,11 @@ public class StableAPI { f.version = trimICU(getAttr(n, "version")); f.file = getAttr(n, "file"); f.purifyPrototype(); - f.file = Function.getBasename(f.file); + if(f.file == null) { + f.file = "{null}"; + } else { + f.file = Function.getBasename(f.file); + } f.comparableName = f.comparableName(); return f; } diff --git a/tools/release/java/src/com/ibm/icu/dev/tools/docs/dumpAllCFunc.xslt b/tools/release/java/src/com/ibm/icu/dev/tools/docs/dumpAllCFunc.xslt index 1cc0c1a7bad..0169ecfe2c9 100644 --- a/tools/release/java/src/com/ibm/icu/dev/tools/docs/dumpAllCFunc.xslt +++ b/tools/release/java/src/com/ibm/icu/dev/tools/docs/dumpAllCFunc.xslt @@ -40,6 +40,67 @@   + + + + + + + + + + (anonymous) + + + + + + + + + + + + + + + + + enum + + + + + + + + + + + + + + + + + + + + + + enum :: + + + + + + + + + diff --git a/tools/release/java/src/com/ibm/icu/dev/tools/docs/dumpAllCppFunc.xslt b/tools/release/java/src/com/ibm/icu/dev/tools/docs/dumpAllCppFunc.xslt index e83d4cea57f..e38c9147235 100644 --- a/tools/release/java/src/com/ibm/icu/dev/tools/docs/dumpAllCppFunc.xslt +++ b/tools/release/java/src/com/ibm/icu/dev/tools/docs/dumpAllCppFunc.xslt @@ -1,38 +1,114 @@ - - - - + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (anonymous) + + + + + + + + + + + + + + + enum + :: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + enum + :: + + + + +   + + + + + +