[157363] emft_R1_0_maintenance cdamus 060914 Proper use of the org.eclipse.pde.core.javadoc extension point
diff --git a/doc/org.eclipse.emf.ocl.doc/build/antJavadoc.sh b/doc/org.eclipse.emf.ocl.doc/build/antJavadoc.sh
index 65e5775..58f1e31 100755
--- a/doc/org.eclipse.emf.ocl.doc/build/antJavadoc.sh
+++ b/doc/org.eclipse.emf.ocl.doc/build/antJavadoc.sh
@@ -28,7 +28,7 @@
if [ "x$hasToken" != "x" ]; then
srcDir=$currentPath/../../$plugin/src
if [ -d "$srcDir" ]; then
- 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'`
+ packages=`find $srcDir -type f -name '*.java' -exec grep -e '^package *\(.*\);.*/\1/' | sed -e 's/[ ]*//g' | sort | uniq | xargs | sed -e 's/ /:/g'`
packages=`echo $packages | sed -e 's/\//\\\\\\//g' | sed -e 's/\./\\\\\./g'`
sed -e "s/\@plugin\@/${packages}/g" $currentPath/javadoc.xml.template > $currentPath/javadoc.xml.template.tmp
@@ -50,9 +50,11 @@
# All the jars in the plugins directory
classpath=`find $eclipseDir/plugins -name "*.jar" -printf "%p:"`
-# Calculates the packagesets and the calls to copyDocFiles
+# Calculates the packagesets and the calls to copyDocFiles (used in javadoc.xml.template) (used in javadoc.xml.template)
+# also calculates pluginIDs used in the PDE Javadoc extension point in the plugin.xml
packagesets=""
copydocfiles=""
+pluginIDs=""
for pluginDir in $pluginDirs; do
pluginDir=`echo $pluginDir | sed -e 's/\/runtime$//g'`
srcDir=$pluginDir/src
@@ -62,6 +64,8 @@
packagesets=$packagesets""$javadocExclusions
packagesets=$packagesets"</packageset>"
copydocfiles=$copydocfiles"<copyDocFiles pluginDir=\"$pluginDir\"/>"
+ pluginID=`echo "$pluginDir" | sed -e 's|.*plugins/org|org|'`
+ pluginIDs=$pluginIDs"<plugin id=\"$pluginID\"/>"
fi
done
@@ -74,6 +78,11 @@
cp $currentPath/javadoc.xml.template $currentPath/javadoc.xml.template.tmp;
fi
+# Replaces the token <!-- @pluginIDs@ --> in the plugin.xml by the value of pluginIDs
+pluginIDs=`echo $pluginIDs | sed -e 's/\//\\\\\\//g' | sed -e 's/\./\\\\\./g'`
+sed -e "s/<\!-- \@pluginIDs\@ -->/${pluginIDs}/g" $currentPath/../plugin.xml > plugin2.xml
+mv plugin2.xml $currentPath/../plugin.xml
+
# 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.tmp > $currentPath/javadoc.xml.template.tmp2
diff --git a/doc/org.eclipse.emf.ocl.doc/plugin.xml b/doc/org.eclipse.emf.ocl.doc/plugin.xml
index b7ad2d3..ab0826f 100644
--- a/doc/org.eclipse.emf.ocl.doc/plugin.xml
+++ b/doc/org.eclipse.emf.ocl.doc/plugin.xml
@@ -39,6 +39,7 @@
<!-- ============================= -->
<extension point="org.eclipse.pde.core.javadoc">
<javadoc path="references/javadoc"> <!-- defaults to reference/api -->
+ <!-- @pluginIDs@ -->
</javadoc>
</extension>