summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2007-05-04 11:16:49 (EDT)
committer pelder2007-05-04 11:16:49 (EDT)
commit41e9cc6cb11d00e54a587222895c428fda0de594 (patch)
tree6535b2d55c12335bdd81f257f261b9ee7351e374
parent89b2017dc599b6e5738961da2ad2b1e8f94244bb (diff)
downloadorg.eclipse.jet-41e9cc6cb11d00e54a587222895c428fda0de594.zip
org.eclipse.jet-41e9cc6cb11d00e54a587222895c428fda0de594.tar.gz
org.eclipse.jet-41e9cc6cb11d00e54a587222895c428fda0de594.tar.bz2
[185565] Back port HEAD build to R0_7_maintenance
-rw-r--r--doc/org.eclipse.jet.doc/build/antJavadoc.sh41
-rw-r--r--doc/org.eclipse.jet.doc/build/javadoc.xml.template36
2 files changed, 47 insertions, 30 deletions
diff --git a/doc/org.eclipse.jet.doc/build/antJavadoc.sh b/doc/org.eclipse.jet.doc/build/antJavadoc.sh
index 383e1af..1cc0a2f 100644
--- a/doc/org.eclipse.jet.doc/build/antJavadoc.sh
+++ b/doc/org.eclipse.jet.doc/build/antJavadoc.sh
@@ -6,17 +6,13 @@
pluginName="org.eclipse.jet";
# string labels for javadoc content
-windowTitle="EMF JET Javadoc";
+windowTitle="JET Javadoc";
groupTitle="JET";
# files to exclude from javadoc process - use Ant syntax
javadocExclusions="<exclude name=\"**/internal/**\"/> <exclude name=\"**/examples/**\"/> <exclude name=\"**/tests/**\"/>";
javadocExclusions=$javadocExclusions" <exclude name=\"**/antsrc/org/eclipse/jet/**\"/> <exclude name=\"dataAccess/**\"/>";
-# special for JET only: always use 1.5 JVM for Javadoc, 1.4 one has memory problems
-# export JAVA_HOME=/opt/sun-java2-5.0
-export JAVA_HOME_1_4=/opt/ibm-java2-1.4
-
# END CUSTOMIZATIONS
##########################################################################
@@ -43,19 +39,30 @@ eclipseDir=`cd $1; echo $PWD`; if [ $debug -gt 0 ]; then echo "[antJd] eclipseDi
destDir=$currentPath/../references/javadoc; mkdir -p $destDir; destDir=`cd $destDir; echo $PWD`; # resolve relative path
if [ $debug -gt 0 ]; then echo "[antJd] destDir: "$destDir; fi
-hasToken=`grep "@plugin@" $antScript.template`;
-if [ "x$hasToken" != "x" ]; then
+hasToken=`grep -c "@plugin@" $antScript".template"`;
+if [ $hasToken -gt 0 ]; then
srcDir=$pluginPath/$pluginName/src; if [ $debug -gt 0 ]; then echo "[antJd] srcDir: "$srcDir; fi
if [ -d "$srcDir" ]; then
- if [ $debug -gt 0 ]; then echo "[antJd] *.java in \$srcDir: "; echo "-----------------"; echo `find $srcDir -type f -name '*.java'`; echo "-----------------"; fi
- packages=`find $srcDir -type f -name '*.java' -exec grep -e '^package .*;' {} \; | sed -e 's/^package *\(.*\);/\1/' | sed -e 's/[ ]*//g' | sort | uniq | xargs | sed -e 's/ /:/g'`;
+ if [ `find $srcDir -name "*.java" | grep -c .` -eq 0 ]; then # must unpack zips first
+ if [ $debug -gt 0 ]; then echo "[antJd] Unpacking *src.zip"; fi
+ for f in `find $srcDir -name "*src.zip"`; do
+ if [ $debug -gt 1 ]; then echo "[antJd] Unpack $f"; fi
+ unzip -q -d $srcDir $f;
+ done
+ fi
+ if [ $debug -gt 0 ]; then echo "[antJd] *.java in srcDir: "; echo "-----------------"; echo `find $srcDir -type f -name '*.java'`; echo "-----------------"; fi
+ packages=`find $srcDir -type f -name '*.java' -exec grep -e '^package .*;' {} \; | sed -e 's/^package *\(.*\);/\1/' | sed -e 's/[ ]*//g' | dos2unix | sort | uniq | xargs | sed -e 's/ /:/g'`;
if [ $debug -gt 1 ]; then echo "[antJd] packages1: "$packages; fi
packages=`echo $packages | sed -e 's/\//\\\\\\//g' | sed -e 's/\./\\\\\./g'`; # slash escape
if [ $debug -gt 1 ]; then echo "[antJd] packages2: "$packages; fi
sed -e "s/\@plugin\@/${packages}/g" $antScript.template > $antScript.template.tmp;
+ else
+ echo "[antJd] ERROR! "$srcDir" does not exist!";
+ exit 1;
fi
else
echo "[antJd] ERROR! "$currentPath"/javadoc.xml.template does not contain token @plugin@!";
+ exit 1;
fi
# Finds plugins in the Workspace:
@@ -68,7 +75,7 @@ fi
### TODO?: missing emf/sdo/xsd plugins in $eclipseDir - need to copy them over or reference source so that all classes/packages (and thus @links) can be resolved
# All the jars in the plugins directory
-classpath=`find $eclipseDir/plugins -name "*.jar" -printf "%p:"`; if [ $debug -gt 0 ]; then echo "[antJd] classpath: "$classpath; fi
+classpath="."`find $eclipseDir/plugins -name "*.jar" -printf ":%p"`; if [ $debug -gt 0 ]; then echo "[antJd] classpath: "$classpath; fi
# Calculates the packagesets and the calls to copyDocFiles
packagesets="";
@@ -121,3 +128,17 @@ ant -f $antScript \
# Clean up templates
rm -f $antScript $antScript.template.tmp $antScript.template.tmp2;
+
+# Generate topics_Reference.xml (replacement for doclet).
+trXML=$currentPath"/../topics_Reference.xml";
+echo '<?xml version="1.0" encoding="UTF-8"?>' > $trXML;
+echo '<?NLS TYPE="org.eclipse.help.toc"?>' >> $trXML;
+echo '<toc label="Reference">' >> $trXML;
+echo ' <topic label="API Reference" href="references/javadoc/overview-summary.html">' >> $trXML;
+for packSum in `find $destDir -name "package-summary.html" | sort`; do
+ path=${packSum%/package-summary.html}; path=${path#$destDir/}; # org/eclipse/xsd/ecore/importer/taskdefs
+ label=${path//\//.}; # org.eclipse.xsd.ecore.importer.taskdefs
+ echo ' <topic label="'$label'" href="references/javadoc/'$path'/package-summary.html" />' >> $trXML;
+done
+echo ' </topic>' >> $trXML;
+echo '</toc>' >> $trXML; \ No newline at end of file
diff --git a/doc/org.eclipse.jet.doc/build/javadoc.xml.template b/doc/org.eclipse.jet.doc/build/javadoc.xml.template
index 8273d35..7eadaf1 100644
--- a/doc/org.eclipse.jet.doc/build/javadoc.xml.template
+++ b/doc/org.eclipse.jet.doc/build/javadoc.xml.template
@@ -13,25 +13,26 @@
<property environment="env"/>
<property name="javaHome" value="${env.JAVA_HOME}"/>
- <property name="javaHome1.4" value="${env.JAVA_HOME_1_4}"/>
<property name="javadoc.link.location" value="${eclipseDir}/javadoc"/>
<available property="platformJavadocExists" file="${javadoc.link.location}/platform/"/>
- <target name="extractPlatformJavadoc" unless="platformJavadocExists">
- <unzip src="${eclipseDir}/plugins/org.eclipse.platform.doc.isv.jar" dest="${javadoc.link.location}/platform/"/>
- </target>
+ <!-- TODO Enable linking to the platform javadoc -->
+ <!-- <target name="extractPlatformJavadoc" unless="platformJavadocExists">
+ <exec executable="find">
+ <arg value="${eclipseDir}/.."/>
+ <arg value="-type"/>
+ <arg value="d"/>
+ <arg value="-name"/>
+ <arg value="javadoc"/>
+ </exec>
+ <unzip src="${eclipseDir}/@docjar@" dest="${javadoc.link.location}/platform/"/>
+ </target> -->
- <target name="javadoc" depends="extractPlatformJavadoc">
- <echo message="Get Doclet and compile it with JDK1.4 for use with javadoc"/>
- <cvs cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/tools"
- package="org.eclipse.emf.releng.build/org.eclipse.emf.build"
- tag="R2_2_maintenance"
- reallyquiet="yes"/>
- <delete dir="org.eclipse.emf.releng.build/org.eclipse.emf.build/src/CVS"/>
- <move todir="."><fileset dir="org.eclipse.emf.releng.build/org.eclipse.emf.build/src"/></move>
+ <!-- TODO Enable linking to the platform javadoc -->
+ <!-- <target name="javadoc" depends="extractPlatformJavadoc"> -->
- <javac srcdir="org/eclipse/emf/build/doclet" classpath=".:${java.home}/../lib/tools.jar" failonerror="true"/>
+ <target name="javadoc">
<javadoc
destdir="${destDir}"
classpath="${classpath}"
@@ -56,15 +57,10 @@
use="true"
version="true">
<arg value="-J-Xmx256m"/>
-
- <doclet name="org.eclipse.emf.build.doclet.Doclet" path=".">
- <param name="-tocFilename" value="topics_Reference.xml"/>
- <param name="-tocRefPrefix" value="references/javadoc/"/>
- <param name="-tocTitle" value="API Reference"/>
- </doclet>
<link offline="true" href="http://java.sun.com/j2se/1.4/docs/api/" packagelistLoc="${javaHome}/docs/api/"/>
- <link offline="true" href="/help/topic/org.eclipse.platform.doc.isv/reference/api/" packagelistLoc="${javadoc.link.location}/platform/reference/api/"/>
+ <!-- TODO Enable link to platform documentation -->
+ <!-- <link offline="true" href="/help/topic/org.eclipse.platform.doc.isv/reference/api/" packagelistLoc="${javadoc.link.location}/platform/reference/api/"/> -->
<tag name="ignore" description="ignore" enabled="false"/>
<tag name="generated" description="ignore" enabled="false"/>