]> granicus.if.org Git - icu/commitdiff
ICU-12739 JDK8 as the reference platform - use Java 8 version of ICUTaglet implementa...
authorYoshito Umaoka <y.umaoka@gmail.com>
Mon, 26 Sep 2016 16:41:39 +0000 (16:41 +0000)
committerYoshito Umaoka <y.umaoka@gmail.com>
Mon, 26 Sep 2016 16:41:39 +0000 (16:41 +0000)
X-SVN-Rev: 39349

.gitattributes
icu4j/build.xml
icu4j/tools/build/.classpath
icu4j/tools/build/.settings/org.eclipse.jdt.core.prefs
icu4j/tools/build/build.xml
icu4j/tools/build/src-pre8/com/ibm/icu/dev/tool/docs/ICUTagletAdapter.java [moved from icu4j/tools/build/src8/com/ibm/icu/dev/tool/docs/ICUTagletAdapter.java with 51% similarity]
icu4j/tools/build/src/com/ibm/icu/dev/tool/docs/ICUTagletAdapter.java

index 41a0c9ad4d9b0423cf3e86f1f1ee7e7e3fc68c34..5e7c02437b26fc7fea067b527e3da71a9482b62e 100644 (file)
@@ -538,6 +538,7 @@ icu4j/tools/build/icu4j54.api3.gz -text
 icu4j/tools/build/icu4j55.api3.gz -text
 icu4j/tools/build/icu4j56.api3.gz -text
 icu4j/tools/build/icu4j57.api3.gz -text
+icu4j/tools/build/src-pre8/com/ibm/icu/dev/tool/docs/ICUTagletAdapter.java -text
 tools/currency/.classpath -text
 tools/currency/.project -text
 tools/currency/.settings/org.eclipse.core.resources.prefs -text
index 329790cfce032faf1a61c7f9b9779ed857029367..b252e1cd67af71dfef6b3a50eece8df6f8105ca8 100644 (file)
         </condition>
     </fail>
 
-    <condition property="is.java7">
-            <contains string="${java.version}" substring="1.7."/>
+    <condition property="is.java8">
+            <contains string="${java.version}" substring="1.8."/>
     </condition>
 
     <condition property="is.java7.plus">
         <or>
             <contains string="${java.version}" substring="1.7."/>
             <contains string="${java.version}" substring="1.8."/>
+            <contains string="${java.version}" substring="1.9."/>
         </or>
     </condition>
 
 
 
     <!-- release targets -->
-    <target name="_check_config_for_release">
+    <target name="_check_config_for_release" depends="_checkJCite">
         <condition property="release.build.config.ok">
             <and>
-                <isset property="is.java7"/>
+                <isset property="is.java8"/>
                 <isset property="java6.bootclasspath"/>
                 <isset property="jcite.libs"/>
             </and>
     </target>
 
     <target name="_verify_config_for_release" depends="_check_config_for_release" unless="release.build.config.ok">
-        <condition property="disp.is.java7" value="${java.version}" else="${java.version} - Must be 1.7!">
-            <isset property="is.java7"/>
+        <condition property="disp.is.java8" value="${java.version}" else="${java.version} - Must be 1.8!">
+            <isset property="is.java8"/>
         </condition>
         <condition property="disp.java6.bootclasspath" value="${java6.bootclasspath}" else="Not Defined!">
             <isset property="java6.bootclasspath"/>
 
         <echo message="################################################################"/>
         <echo message="[WARNING] Insufficient Build Configuration for ICU4J Release"/>
-        <echo message="JDK Tools Version:              ${disp.is.java7}"/>
+        <echo message="JDK Tools Version:              ${disp.is.java8}"/>
         <echo message="JRE 6 System Library Path:      ${disp.java6.bootclasspath}"/>
         <echo message="JCite Library Path:             ${disp.jcite.libs}"/>
         <echo message="################################################################"/>
index f88bc4ed2fcf77b987dae0936584539345dc0b8e..eac3c340f64a91a68ad3ff20a5e832b03adb6a83 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
        <classpathentry kind="src" path="src"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JDK7_TOOLS"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JDK8_TOOLS"/>
        <classpathentry kind="output" path="out/bin"/>
 </classpath>
index 59cc759450a24046a3d84795a7a06d90bd79d0c6..4421badc58a02230b3d85c544d25d03bf6d4a6c8 100644 (file)
@@ -7,9 +7,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
 org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -98,7 +98,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
 org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
index 4401cc6854238ac8b38b2247b867509881a0dedc..15d458e65990b5c7909a20d4fab97a8ba96f73dd 100644 (file)
     <property file="build.properties"/>
 
     <!-- before importing common-targets.xml -->
-    <condition property="alt.src.dir" value="out/tmp-src8">
-        <equals arg1="${ant.java.version}" arg2="1.8"/>
+    <condition property="alt.src.dir" value="out/tmp-src-pre8">
+        <or>
+            <equals arg1="${ant.java.version}" arg2="1.6"/>
+            <equals arg1="${ant.java.version}" arg2="1.7"/>
+        </or>
     </condition>
 
     <condition property="src.dir" value="${alt.src.dir}">
 
     <target name="clean" depends="@clean" description="Clean up the build outputs"/>
 
-    <target name="compile" depends="copy-src-jdk8, @compile" description="Compile java source files"/>
+    <target name="compile" depends="copy-src-pre8, @compile" description="Compile java source files"/>
 
     <target name="copy" depends="@copy" description="Copy non-java runtime files to the project's binary directory"/>
 
     <target name="jar" depends="compile, copy, @jar" description="Create the project's jar file"/>
 
-    <target name="src-jar" depends="copy-src-jdk8, @src-jar" description="Create the project's source jar file"/>
+    <target name="src-jar" depends="copy-src-pre8, @src-jar" description="Create the project's source jar file"/>
 
     <!-- Override a source file for supporting JDK 8 JavaDoc -->
-    <target name="copy-src-jdk8" if="alt.src.dir">
-        <echo message="Building ICU4J build tools with JDK8 tools..."/>
+    <target name="copy-src-pre8" if="alt.src.dir">
+        <echo message="Building ICU4J build tools with JDK7 or older tools..."/>
         <mkdir dir="${alt.src.dir}"/>
         <!-- copy all files under 'src' -->
         <copy todir="${alt.src.dir}">
             <fileset dir="src"/>
         </copy>
-        <!-- overwrite jdk8 specific source file -->
+        <!-- overwrite jdk7 or older specific source file -->
         <copy todir="${alt.src.dir}" overwrite="yes">
-            <fileset dir="src8"/>
+            <fileset dir="src-pre8"/>
         </copy>
     </target>
 </project>
\ No newline at end of file
similarity index 51%
rename from icu4j/tools/build/src8/com/ibm/icu/dev/tool/docs/ICUTagletAdapter.java
rename to icu4j/tools/build/src-pre8/com/ibm/icu/dev/tool/docs/ICUTagletAdapter.java
index 94ed1bb416daf77881a38d4b20bd96b19e14790f..60736473e00f76c79b31ab400dcd618ff9664a42 100644 (file)
@@ -1,60 +1,49 @@
-// © 2016 and later: Unicode, Inc. and others.
-// License & terms of use: http://www.unicode.org/copyright.html#License
-/*
- *******************************************************************************
- * Copyright (C) 2015, International Business Machines Corporation and         *
- * others. All Rights Reserved.                                                *
- *******************************************************************************
- */
-package com.ibm.icu.dev.tool.docs;
-
-import com.sun.javadoc.Doc;
-import com.sun.javadoc.Tag;
-import com.sun.tools.doclets.formats.html.markup.RawHtml;
-import com.sun.tools.doclets.internal.toolkit.Content;
-import com.sun.tools.doclets.internal.toolkit.taglets.Taglet;
-import com.sun.tools.doclets.internal.toolkit.taglets.TagletWriter;
-
-/**
- * The ICUTagletAdapter class is the abstract base class that adapts the ICUTaglet class to different implementations of the JavaDoc API. 
- * The methods in this class are meant to minimize the dual maintenance nature of supporting multiple JavaDoc APIs.
- * 
- * This adapter supports the v8 JavaDoc API
- */
-public abstract class ICUTagletAdapter implements Taglet {
-    
-    public abstract String toString(Tag tag);
-
-    public abstract String toString(Tag[] tags);
-
-    public Content getTagletOutput(Tag tag, TagletWriter writer)
-        throws IllegalArgumentException {
-
-        // addContext doesn't except nulls so filter them out
-        String encodedText = toString(tag);
-        if(encodedText == null) return null;
-           
-        Content out = writer.getOutputInstance();
-        out.addContent(new RawHtml(encodedText));
-         
-        return out;
-    }
-
-    public Content getTagletOutput(Doc holder, TagletWriter writer)
-        throws IllegalArgumentException {
-
-        Content out = writer.getOutputInstance();
-        Tag[] tags = holder.tags(getName());
-        if (tags.length == 0) {
-            return null;
-        }
-
-        // addContext doesn't except nulls so filter them out
-        String encodedText = toString(tags[0]);
-        if(encodedText == null) return null;
-
-        out.addContent(new RawHtml(encodedText));
-        return out;
-    }
-
-}
+// © 2016 and later: Unicode, Inc. and others.\r
+// License & terms of use: http://www.unicode.org/copyright.html#License\r
+/*\r
+ *******************************************************************************\r
+ * Copyright (C) 2015, International Business Machines Corporation and         *\r
+ * others. All Rights Reserved.                                                *\r
+ *******************************************************************************\r
+ */\r
+package com.ibm.icu.dev.tool.docs;\r
+\r
+import com.sun.javadoc.Doc;\r
+import com.sun.javadoc.Tag;\r
+import com.sun.tools.doclets.internal.toolkit.taglets.Taglet;\r
+import com.sun.tools.doclets.internal.toolkit.taglets.TagletOutput;\r
+import com.sun.tools.doclets.internal.toolkit.taglets.TagletWriter;\r
+\r
+/**\r
+ * The ICUTagletAdapter class is the abstract base class that adapts the ICUTaglet class to different implementations of the JavaDoc API. \r
+ * The methods in this class are meant to minimize the dual maintenance nature of supporting multiple JavaDoc APIs.\r
+ * \r
+ * This adapter supports the v7 and earlier JavaDoc API\r
+ */\r
+public abstract class ICUTagletAdapter implements Taglet {\r
+\r
+    public abstract String toString(Tag tag);\r
+\r
+    public abstract String toString(Tag[] tags);\r
+\r
+    public TagletOutput getTagletOutput(Tag tag, TagletWriter writer)\r
+            throws IllegalArgumentException {\r
+\r
+            TagletOutput out = writer.getTagletOutputInstance();\r
+            out.setOutput(toString(tag));\r
+            return out;\r
+        }\r
+\r
+        public TagletOutput getTagletOutput(Doc holder, TagletWriter writer)\r
+            throws IllegalArgumentException {\r
+\r
+            TagletOutput out = writer.getTagletOutputInstance();\r
+            Tag[] tags = holder.tags(getName());\r
+            if (tags.length == 0) {\r
+                return null;\r
+            }\r
+            out.setOutput(toString(tags[0]));\r
+            return out;\r
+        }\r
+\r
+}\r
index c7ad01ae0001bb44aecb88684c82b790d2586f54..94ed1bb416daf77881a38d4b20bd96b19e14790f 100644 (file)
@@ -10,40 +10,51 @@ package com.ibm.icu.dev.tool.docs;
 
 import com.sun.javadoc.Doc;
 import com.sun.javadoc.Tag;
+import com.sun.tools.doclets.formats.html.markup.RawHtml;
+import com.sun.tools.doclets.internal.toolkit.Content;
 import com.sun.tools.doclets.internal.toolkit.taglets.Taglet;
-import com.sun.tools.doclets.internal.toolkit.taglets.TagletOutput;
 import com.sun.tools.doclets.internal.toolkit.taglets.TagletWriter;
 
 /**
  * The ICUTagletAdapter class is the abstract base class that adapts the ICUTaglet class to different implementations of the JavaDoc API. 
  * The methods in this class are meant to minimize the dual maintenance nature of supporting multiple JavaDoc APIs.
  * 
- * This adapter supports the v7 and earlier JavaDoc API
+ * This adapter supports the v8 JavaDoc API
  */
 public abstract class ICUTagletAdapter implements Taglet {
-
+    
     public abstract String toString(Tag tag);
 
     public abstract String toString(Tag[] tags);
 
-    public TagletOutput getTagletOutput(Tag tag, TagletWriter writer)
-            throws IllegalArgumentException {
-
-            TagletOutput out = writer.getTagletOutputInstance();
-            out.setOutput(toString(tag));
-            return out;
+    public Content getTagletOutput(Tag tag, TagletWriter writer)
+        throws IllegalArgumentException {
+
+        // addContext doesn't except nulls so filter them out
+        String encodedText = toString(tag);
+        if(encodedText == null) return null;
+           
+        Content out = writer.getOutputInstance();
+        out.addContent(new RawHtml(encodedText));
+         
+        return out;
+    }
+
+    public Content getTagletOutput(Doc holder, TagletWriter writer)
+        throws IllegalArgumentException {
+
+        Content out = writer.getOutputInstance();
+        Tag[] tags = holder.tags(getName());
+        if (tags.length == 0) {
+            return null;
         }
 
-        public TagletOutput getTagletOutput(Doc holder, TagletWriter writer)
-            throws IllegalArgumentException {
+        // addContext doesn't except nulls so filter them out
+        String encodedText = toString(tags[0]);
+        if(encodedText == null) return null;
 
-            TagletOutput out = writer.getTagletOutputInstance();
-            Tag[] tags = holder.tags(getName());
-            if (tags.length == 0) {
-                return null;
-            }
-            out.setOutput(toString(tags[0]));
-            return out;
-        }
+        out.addContent(new RawHtml(encodedText));
+        return out;
+    }
 
 }