summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2007-02-07 11:39:46 (EST)
committer pelder2007-02-07 11:39:46 (EST)
commite8cdd98eff4e50689e7495141da75c2e8087a4d5 (patch)
tree0321a6f87f8329256e65926b1e351f1ac7d568d9
parent6b134fe1abf0406215a382c0450573878cea169e (diff)
downloadorg.eclipse.jet-e8cdd98eff4e50689e7495141da75c2e8087a4d5.zip
org.eclipse.jet-e8cdd98eff4e50689e7495141da75c2e8087a4d5.tar.gz
org.eclipse.jet-e8cdd98eff4e50689e7495141da75c2e8087a4d5.tar.bz2
[171451] Fix HEAD Javadoc generation. Move to latest template
-rw-r--r--doc/org.eclipse.jet.doc/build/antJavadoc.sh43
1 files changed, 32 insertions, 11 deletions
diff --git a/doc/org.eclipse.jet.doc/build/antJavadoc.sh b/doc/org.eclipse.jet.doc/build/antJavadoc.sh
index 383e1af..16c4edc 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";
-groupTitle="JET";
+windowTitle="EMFT JET Javadoc";
+groupTitle="EMFT 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;