diff options
author | khussey | 2007-04-03 17:35:23 +0000 |
---|---|---|
committer | khussey | 2007-04-03 17:35:23 +0000 |
commit | 9ddf8779e8c8d45d05402e97bdae429df8fa9ff4 (patch) | |
tree | b459fb53427f8f7eebb1936a28969db223ac29bb /doc | |
parent | eae94b5bb4e9ce24b25361f869715dd57ac42580 (diff) | |
download | org.eclipse.uml2-9ddf8779e8c8d45d05402e97bdae429df8fa9ff4.tar.gz org.eclipse.uml2-9ddf8779e8c8d45d05402e97bdae429df8fa9ff4.tar.xz org.eclipse.uml2-9ddf8779e8c8d45d05402e97bdae429df8fa9ff4.zip |
[173647] Making changes required for new modeling build.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/org.eclipse.uml2.doc/build/antJavadoc.sh | 170 | ||||
-rw-r--r-- | doc/org.eclipse.uml2.doc/build/javadoc.xml.template | 65 |
2 files changed, 58 insertions, 177 deletions
diff --git a/doc/org.eclipse.uml2.doc/build/antJavadoc.sh b/doc/org.eclipse.uml2.doc/build/antJavadoc.sh index a89e55631..4f9b36b52 100644 --- a/doc/org.eclipse.uml2.doc/build/antJavadoc.sh +++ b/doc/org.eclipse.uml2.doc/build/antJavadoc.sh @@ -1,48 +1,18 @@ -#!/bin/sh +# The current direcotry +currentPath=$PWD -# BEGIN CUSTOMIZATIONS - -# The plugin name -pluginName="org.eclipse.uml2"; - -# string labels for javadoc content -windowTitle="UML2 Javadoc"; -groupTitle="UML2"; - -# files to exclude from javadoc process - use Ant syntax -javadocExclusions="<exclude name=\"**/impl/**\"/> <exclude name=\"**/internal/**\"/> <exclude name=\"**/examples/**\"/> <exclude name=\"**/tests/**\"/> <exclude name=\"**/templates/**\"/>"; - -# END CUSTOMIZATIONS - -########################################################################## - -debug=0; if [ $debug -gt 0 ]; then echo "[antJd] debug: "$debug; fi - -if [ "x"$ANT_HOME = "x" ]; then export ANT_HOME=/opt/apache-ant-1.6; fi -if [ "x"$JAVA_HOME = "x" ]; then export JAVA_HOME=/opt/ibm-java2-1.4; fi -export PATH=${PATH}:${ANT_HOME}/bin - -# current directory - all but the name of this script, no trailing slash -currentPath=$PWD"/"$0; currentPath=${currentPath%/*}; if [ $debug -gt 0 ]; then echo "[antJd] currentPath: "$currentPath; fi - -# path to $buildID/eclipse/plugins, no trailing slash -pluginPath=${currentPath%/$pluginName*}; if [ $debug -gt 0 ]; then echo "[antJd] pluginName: "$pluginName; echo "[antJd] pluginPath: "$pluginPath; fi - -# ant script to create and then execute -antScript=$currentPath"/javadoc.xml"; if [ $debug -gt 0 ]; then echo "[antJd] antScript: "$antScript; fi -cp $antScript.template $antScript.template.orig; +# export JAVA_HOME=/opt/sun-java2-5.0 # The eclipse directory -eclipseDir=`cd $1; echo $PWD`; if [ $debug -gt 0 ]; then echo "[antJd] eclipseDir: "$eclipseDir; fi +eclipseDir=$1 # The destination directory -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 -c "@plugin@" $antScript".template"`; +destDir=$eclipseDir/plugins/org.eclipse.uml2.doc/references/javadoc -# Finds plugins in the Workspace: -pluginDirs=`find $pluginPath -name "${pluginName}*" -maxdepth 1 -type d -printf '%T@ %p\n' | sort -n | cut -f2 -d' '`; +# Don't execute if the destination directory has files +if [ -d $destDir ]; then + exit +fi function groupPackage { @@ -61,107 +31,55 @@ function groupPackage fi } -if [ $hasToken -gt 0 ]; then - for pluginDir in $pluginDirs; do - srcDir=$pluginDir/src; - echo "[antJd] Process "$srcDir; - if [ -d "$srcDir" ]; then - 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 - cp -r ${srcDir} ${srcDir}_orig; - 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; - mv $antScript.template.tmp $antScript.template; - fi - done -else - groupPackage org.eclipse.uml2.codegen.ecore - groupPackage org.eclipse.uml2.codegen.ecore.ui - - groupPackage org.eclipse.uml2.common - groupPackage org.eclipse.uml2.common.edit +groupPackage org.eclipse.uml2.codegen.ecore +groupPackage org.eclipse.uml2.codegen.ecore.ui - groupPackage org.eclipse.uml2.uml +groupPackage org.eclipse.uml2.common +groupPackage org.eclipse.uml2.common.edit - groupPackage org.eclipse.uml2.uml.ecore.exporter - groupPackage org.eclipse.uml2.uml.ecore.importer +groupPackage org.eclipse.uml2.uml - groupPackage org.eclipse.uml2.uml.edit +groupPackage org.eclipse.uml2.uml.ecore.exporter +groupPackage org.eclipse.uml2.uml.ecore.importer - groupPackage org.eclipse.uml2.uml.editor -fi +groupPackage org.eclipse.uml2.uml.edit -# Finds plugins in the Workspace: -pluginDirs=`find $pluginPath -name "${pluginName}*" -maxdepth 1 -type d -printf '%T@ %p\n' | sort -n | cut -f2 -d' '`; -if [ $debug -gt 0 ]; then - echo "[antJd] pluginDirs:"; - for pluginDir in $pluginDirs; do echo "[antJd] "$pluginDir; done -fi +groupPackage org.eclipse.uml2.uml.editor -### 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 +# The directory of the uml2 plugins in the order they were built +pluginDirs=`find $eclipseDir/plugins -name @dot -printf '%T@ %p\n' | sort -n | egrep -e 'org.eclipse.uml2' | egrep -v 'example' | egrep -v 'tests' | cut -f2 -d' ' | sed -e 's/\(\/.*\)\/.*/\1/'` -# 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 +# All the jars in the pluigins directory +classpath=`find $eclipseDir/plugins -name *.jar -print | grep -v org.eclipse.uml2 | tr '\n' ';'` -# Calculates the packagesets and the calls to copyDocFiles -packagesets=""; -copydocfiles=""; +# Calculates the packagesets +packagesets="" for pluginDir in $pluginDirs; do - pluginDir=`echo $pluginDir | sed -e 's/\/runtime$//g'`; - srcDir=$pluginDir/src; - if [ $debug -gt 0 ]; then echo "[antJd] srcDir: "$srcDir; fi - if [ -d "$srcDir" ]; then - # define what to include when javadoc'ing here: - packagesets=$packagesets"<packageset dir=\"$srcDir\"> "; - packagesets=$packagesets"<exclude name=\"$srcDir/**/doc-files/**\"/> "; - packagesets=$packagesets""$javadocExclusions; - packagesets=$packagesets"</packageset>"; - copydocfiles=$copydocfiles"<copyDocFiles pluginDir=\"$pluginDir\"/>"; + pluginDir=`echo $pluginDir | sed -e 's/\/runtime$//g'` + srcDir=$pluginDir/src + if [ -d $srcDir ]; then + packagesets=$packagesets"<packageset dir=\"$srcDir\">" + packagesets=$packagesets"<exclude name=\"**/impl/**\"/>" + packagesets=$packagesets"<exclude name=\"**/internal/**\"/>" + packagesets=$packagesets"<exclude name=\"**/templates/**\"/>" + packagesets=$packagesets"</packageset>" fi done -if [ $debug -gt 0 ]; then - echo "[antJd] packagesets:"; echo $packagesets; - echo "[antJd] copydocfiles:"; echo $copydocfiles; -fi - -# Finds the proper org.eclipse.platform.doc.isv jar -docjar=`find $eclipseDir/plugins/ -name "org.eclipse.platform.doc.isv*.jar" -printf "%f"`; if [ $debug -gt 1 ]; then echo "[antJd] docjar: "$docjar; fi -# do replacements in template -if [ $debug -gt 1 ]; then echo "[antJd] Replace @packagesets@ in the template ..."; fi -packagesets=`echo $packagesets | sed -e 's/\//\\\\\\//g' | sed -e 's/\./\\\\\./g'`; -sed -e "s/\@packagesets\@/${packagesets}/g" $antScript.template > $antScript.template.tmp; +# Replaces the token @packagesets@ in the template by the actual value +packagesets=`echo $packagesets | sed -e 's/\//\\\\\\//g' | sed -e 's/\./\\\\\./g'` +sed -e "s/\@packagesets\@/${packagesets}/g" $currentPath/javadoc.xml.template > javadoc.xml -if [ $debug -gt 1 ]; then echo "[antJd] Replace @copydocfiles@ in the template ..."; fi -copydocfiles=`echo $copydocfiles | sed -e 's/\//\\\\\\//g' | sed -e 's/\./\\\\\./g'`; -sed -e "s/\@copydocfiles\@/${copydocfiles}/g" $antScript.template.tmp > $antScript; - -#run ant to do javadoc build -ant -f $antScript \ +# Executes the ant script +ant -f javadoc.xml \ -DdestDir="$destDir" \ -Dclasspath="$classpath" \ -DeclipseDir="$eclipseDir" \ - -Ddocjar="$docjar" \ - -DwindowTitle="$windowTitle" \ - -DgroupTitle="$groupTitle" \ - -Doverview="$currentPath/overview.html"; - -# Clean up templates -rm -f $antScript $antScript.template.tmp; -mv -f $antScript.template.orig $antScript.template; + -Doverview="$eclipseDir/plugins/org.eclipse.uml2.doc/build/overview.html" # Generate topics_Reference.xml (replacement for doclet). trXML=$currentPath"/../topics_Reference.xml"; -echo '<?xml version="1.0" encoding="UTF-8"?>' > $trXML; +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; @@ -172,13 +90,3 @@ for packSum in `find $destDir -name "package-summary.html" | sort`; do done echo ' </topic>' >> $trXML; echo '</toc>' >> $trXML; - -# cleanup unpacked src/ folders -for pluginDir in $pluginDirs; do - srcDir=$pluginDir/src; - if [[ -d ${srcDir}"_orig" ]]; then - echo "[antJd] Replace unpacked "$srcDir; - rm -fr ${srcDir}; # clean up unpacked source - mv -f ${srcDir}_orig ${srcDir}; - fi -done diff --git a/doc/org.eclipse.uml2.doc/build/javadoc.xml.template b/doc/org.eclipse.uml2.doc/build/javadoc.xml.template index 251aea12d..101abab37 100644 --- a/doc/org.eclipse.uml2.doc/build/javadoc.xml.template +++ b/doc/org.eclipse.uml2.doc/build/javadoc.xml.template @@ -3,43 +3,32 @@ <property name="destDir" value="doc"/> <property name="classpath" value="bin"/> <property name="overview" value="build/overview.html"/> - <property name="eclipseDir" value="."/> - <property name="docjar" value="org.eclipse.platform.doc.isv.jar"/> - - <!-- other properties that must be passed to this script include: - windowTitle - groupTitle - --> + <property name="eclipseDir" value="../../.."/> <property environment="env"/> <property name="javaHome" value="${env.JAVA_HOME}"/> <property name="javadoc.link.location" value="${eclipseDir}/javadoc"/> <available property="platformJavadocExists" file="${javadoc.link.location}/platform/"/> + <available property="platformEMFExists" file="${javadoc.link.location}/emf/"/> - <!-- 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="extractPlatformJavadoc" unless="platformJavadocExists"> + <unzip src="${eclipseDir}/plugins/org.eclipse.platform.doc.isv.jar" dest="${javadoc.link.location}/platform/"/> + </target> + + <target name="extractEMFJavadoc" unless="platformEMFExists"> + <unzip src="${eclipseDir}/plugins/org.eclipse.emf.doc/doc.zip" dest="${javadoc.link.location}/emf/"/> + </target> - <!-- TODO Enable linking to the platform javadoc --> - <!-- <target name="javadoc" depends="extractPlatformJavadoc"> --> + <target name="javadoc" depends="extractPlatformJavadoc,extractEMFJavadoc"> - <target name="javadoc"> <javadoc destdir="${destDir}" classpath="${classpath}" overview="${overview}" - windowtitle="${windowTitle}" - footer="Copyright 2006, 2007 IBM Corporation and others.<br> All Rights Reserved." + windowtitle="Unified Modeling Language 2.x Javadoc" + footer="Copyright 2003, 2006 IBM Corporation and others.<br> All Rights Reserved." access="protected" additionalparam="-breakiterator -tag model:X -tag generated:X -tag ordered:X" @@ -56,11 +45,11 @@ splitindex="true" use="true" version="true"> - <arg value="-J-Xmx180m"/> - - <link offline="true" href="http://java.sun.com/j2se/1.4/docs/api/" packagelistLoc="${javaHome}/docs/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/"/> --> + <arg value="-J-Xmx256m"/> + + <link offline="true" href="http://java.sun.com/j2se/1.5/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/"/> + <link offline="true" href="/help/topic/org.eclipse.emf.doc/references/javadoc/" packagelistLoc="${javadoc.link.location}/emf/references/javadoc/"/> <tag name="ignore" description="ignore" enabled="false"/> <tag name="generated" description="ignore" enabled="false"/> @@ -70,8 +59,6 @@ <tag name="implements" description="ignore" enabled="false"/> <tag name="ordered" description="ignore" enabled="false"/> - <!-- If you add a @ plugin @ below, don't forget to update the antjavadoc.sh file --> - <group title="Ecore Code Generation" packages="@org.eclipse.uml2.codegen.ecore@"/> <group title="Ecore Code Generation UI" packages="@org.eclipse.uml2.codegen.ecore.ui@"/> @@ -83,24 +70,10 @@ <group title="UML Editor" packages="@org.eclipse.uml2.uml.editor@"/> <group title="UML Importer for EMF" packages="@org.eclipse.uml2.uml.ecore.importer@"/> <group title="UML Exporter for EMF" packages="@org.eclipse.uml2.uml.ecore.exporter@"/> - - <!-- If you add a @ plugin @ above, don't forget to update the antjavadoc.sh file --> - @packagesets@ + +@packagesets@ </javadoc> - - <!-- make sure the doc-files are copied --> - <macrodef name="copyDocFiles"> - <attribute name="pluginDir"/> - <sequential> - <copy todir="${destDir}" failonerror="false"> - <fileset dir="@{pluginDir}/src" includes="**/doc-files/**"/> - </copy> - </sequential> - </macrodef> - - @copydocfiles@ - </target> </project> |